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
What is difference between yielding and sleeping?
Why do I get a security exception when I try to run my c# app?
What are the differences between events and delegates in c#?
What is difference between write and writeline in c#?
Which class comes after the SortedList class?
What is data type c#?
What is the purpose of dependency injection?
Are structs value types c#?
What is marshalling and what are different kinds of marshalling?
What are the various components in crystal reports?
These questions were asked me in a technical interview: •If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? •How security pinholes will be handled in an application? •What things should be considered while writing a web application? •How will you do load/performance testing of web application? Which framework you will use for it? •How will you implement a cache for results which require a DB access? Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application. Your guidelines will be helpful.
How long does it take to learn c# programming?
Where do we use static class in c#?
Which controls do not have events?
What is string class in c#?