P
Phill
Does this cause boxing to occur?
class Test
{
void myFunc(ref int theInt)
{
theInt = 10;
}
Test()
{
int x = 0;
myFunc(ref x);
}
}
So is x being boxed into an Object instance and passed by reference
that way and then unboxed back into an int? Or is it like C++ where
the address of x on the stack is really being passed & worked on w/o
any object creation happening?
class Test
{
void myFunc(ref int theInt)
{
theInt = 10;
}
Test()
{
int x = 0;
myFunc(ref x);
}
}
So is x being boxed into an Object instance and passed by reference
that way and then unboxed back into an int? Or is it like C++ where
the address of x on the stack is really being passed & worked on w/o
any object creation happening?