The following code successfully swaps the values in array b and array c. Since array is a reference type, I dont expect the code should work. The execution of "testb = testc" should change the value pointed to by testa. So, by the end of execution, I expect testb = testc = {4,5}. Can someone explain why that is not so? TIA!
static void Main(string[] args)
{
int[] testa = null;
int[] testb = new int[] { 3, 4 };
int[] testc = new int[] { 4, 5 };
testa = testb;
testb = testc;
testc = testa;
}