How I can copy a data from array to another array in MVC C# without overwrite it.
string[] total = new {"Apple", "Banana", "Cat"};
string[] arrayA= new {"Donkey", "Ear", "Frog"};
total= new List<string>().Concat(arrayA).ToArray();
This code basically just Copy the data from arrayA
and overwrite it. So is there anyway to add or copy the data from arrayA
and add it into total
After string[] total = new List<string>().Concat(arrayA).ToArray();
my total
value had become arrayA
and the value inside total
is been overwrite.