What?s the difference between the System.Array.CopyTo() and
System.Array.Clone()?
Answer Posted / sree..
The below code does a deep copy.
Let me know if something is wrong with the code.
string[] array = new string[1] { "aaa" };
string[] copy = new string[1];
array.CopyTo(copy, 0);
copy[0] = "xyz";
Console.WriteLine(array[0]);
I see array[0] value as "aaa".
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
explain the features of static/shared classes.
How do I link two windows forms in c#?
Does google use c#?
How many destructors can a class have?
What is callback method in c#?
Define thread?
What is expression tree in c#?
Explain dataset.acceptchanges method in .net?
What is difference between constants and readonly in c#?
Which config file has all the supported channels/protocol?
What is the difference between ref and out parameters in c#?
What is difference between for and foreach in c#?
What are the steps to make an assembly to public?
What are the fundamental differences between value types and reference types?
What are primitive types in c#?