Given the following class:
class A
{
public List ListB;
// etc...
}
where B is another class that may inheri
private interface IDeepCopy where T : class
{
T DeepCopy();
}
private class MyClass : IDeepCopy
{
public MyClass DeepCopy()
{
return (MyClass)this.MemberwiseClone();
}
}
Pluss: Yoy can control copy process (if your class has identifier property you can set them, or you can write other business logic code)
Minus: class can be marked as sealed