如何用csharp深克隆一个对象(优雅方案)? 电脑版发表于:2021/7/21 15:30 ```csharp public class DepthClone<T> { public virtual T Clone() { var memory = new MemoryStream(); var formatter = new BinaryFormatter(); formatter.Serialize(memory, this); memory.Position = 0; return (T)formatter.Deserialize(memory); } } ```