What is main purpose of using Clone() in C#?
What is the benefit of using it?
When we copy the contents of an object to another (SomeClass obj2 = obj1), obj2 also belonging to the same class, modifying the content of obj2 will also modify the content of obj1. This is because they are reference types. Using Clone() (in a proper manner) can avoid this. On modifying a cloned object , the original will not get modified.