I want to understand whether the memory address of an object changed when pass by reference to function as per Microsoft documentation. While verifying I saw something different. Address for these objects remained the same as shown in the attached image. My understanding is that address for main object t1 should be changed as the new object is assigned.
static void Main(string[] args)
{
Test t1 = new Test() { a = 10 };
GetCallByRefForObj(ref t1);
}
public static void GetCallByRefForObj(ref Test x)
{
x = new Test() { a = 10 };
}
