M
MRe
Hi,
Why doesn't this work (it gives the error 'A ref or out argument must be
an assignable variable').
public void Caller()
{
int Value;
Callee(ref Value = 5); // <-- Error here under Value = 5; it's
assignable, look at me assign, woo!
}
public void Callee(ref int Value)
{
MessageBox.Show(Value.ToString());
}
..is ref evaluated before any operators (It also doesn't work with
Callee(ref (Value = 5))?
I'm using VS2005; .NET2.0.
Thank you,
Eliott
Why doesn't this work (it gives the error 'A ref or out argument must be
an assignable variable').
public void Caller()
{
int Value;
Callee(ref Value = 5); // <-- Error here under Value = 5; it's
assignable, look at me assign, woo!
}
public void Callee(ref int Value)
{
MessageBox.Show(Value.ToString());
}
..is ref evaluated before any operators (It also doesn't work with
Callee(ref (Value = 5))?
I'm using VS2005; .NET2.0.
Thank you,
Eliott