function RefTest {
param(
[REF]$refVar
)
$refVar.Value = 1
}
$intVar = 0
"`$intVar = $intVar"
RefTest ([REF]$intVar)
"`$intVar = $intVar"
--
Kirk Munro [MVP]
Poshoholic
http://poshoholic.com
"RD" <RD@xxxxxx> wrote in message
news:B280F97F-5ECF-4CA9-BF2C-6704F51AC00D@xxxxxx
Quote:
> I'm trying to pass ArrayList as [ref] to a function without any success. I
> tried .Add which fails because [ref] deosn't have Add method. I tried
> casting
> but to no avail. Does any one have any sample code? thanks.