public virtual void CopyFrom(ICustomCloning other) { if (other is Addresses) { var o as Addresses; //Do your copy from o. } }
public virtual void CopyFrom(ICustomCloning other){ if(other is Addresses){ var o as Addresses; //Do your copy from o. } else if(other is Customer) //var o = (other as Customer). Addresses; //Do your copy from o }
public virtual void CopyFrom(ICustomCloning other){ if(other is Customer) { var o = other as Customer; //copy values from o. //this.Name = o.Name; } //else if(other is Addresses) //this.Addresses.CopyFrom(other); }