System.IClonable
interface defines one method only which creates a new object that is the copy of the object that Clone()
was called on. Clone()
was called on. public object Clone();
Clone()
is free to perform a shallow copy or a deep copy. Therfore, Microsoft recommends that IClonable
not be used in public APIs. Object.MemberwiseClone()
creates a shallow copy of an object.