c#中常会涉及到一些类,List的深度拷贝。
摘要:
public object Clone(object ldc) { BinaryFormatter Formatter = new BinaryFormatter(); MemoryStream stream = new MemoryStream(); Formatter.Serialize(stream, ldc); stream.Position = 0; object clonedObj = Formatter.Deserialize(stream); stream.Close(); return clonedObj; }http://www.cnblogs.com/sunway/arc 阅读全文
posted @ 2012-11-02 16:44 YEKEYISHUO 阅读(118) 评论(0) 推荐(0) 编辑