Given the following class:
class A
{
public List ListB;
// etc...
}
where B
is another class that may inheri
your interface IDeepCopy is exactly what ICloneable specifies.
class B : ICloneable
{
public object Clone() { return new B(); }
}
and with more friendly implementation :
class B : ICloneable
{
public B Clone() { return new B(); }
// explicit implementation of ICloneable
object ICloneable.Clone() { return this.Clone(); }
}