I have the following code:
string[] firstArray = { "bla bla", "bla bla", "bla bla"};
string[] secondArray = {"aaaaaaaaaaaa", "aaaaaaaaaaa", "aaaaaaaaa"};
string[] newArray = firstArray;
firstArray = secondArray;
foreach (string item in newArray)
{
Console.WriteLine(item);
}
This code gives the following results:
bla bla
bla bla
bla bla
I can't understand why the newArray has the same conntent after I assign a different instance to the firstArray. Please help me.