






















public T Clone(bool isDeepCopy)
{
T t;
if (isDeepCopy)
{
MemoryStream memoryStream = new MemoryStream();
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(memoryStream, this);
memoryStream.Position = 0;
t= (T)formatter.Deserialize(memoryStream);
}
else
t= (T)this.MemberwiseClone();
return t;
}
public abstract EntityBase:IEntity,INotify
{
public T ToClone(){}
public string ToXml(){}
public DataTable ToDataTable() {}
}
http://www.cnblogs.com/webabcd/archive/2011/05/23/2054002.html
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。