What?s the difference between the System.Array.CopyTo() and
System.Array.Clone()?
Answer Posted / rajesh
The Clone() method returns a new array (a shallow copy)
object containing all the elements in the original array.
The CopyTo() method copies the elements into another
existing array. Both perform a shallow copy. A shallow
copy means the contents (each array element) contains
references to the same object as the elements in the
original array. A deep copy (which neither of these
methods performs) would create a new instance of each
element's object, resulting in a different, yet identacle
object.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?
What is c# entity framework?
What are console applications used for?
What are c# types?
Which technology is best for desktop application?
Can abstract class have private constructor c#?
What is the interface in c#?
Why do we use static methods in c#?
What is a console application in c#?
Is unboxing an implicit conversion?
What is the main purpose of delegates in c#?
How to properly clean up excel interop objects?
Can fields inside a class be virtual?
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.
What do you mean by jagged arrays in c#?