标签:
1 /// <summary> 2 /// 对对象进行深度拷贝 3 /// </summary> 4 /// <param name="obj"></param> 5 /// <returns></returns> 6 private object Clone(object obj) 7 { 8 MemoryStream memory_stream = new MemoryStream(); 9 BinaryFormatter formatter = new BinaryFormatter(); 10 11 formatter.Serialize(memory_stream,obj); 12 memory_stream.Position = 0; 13 14 return formatter.Deserialize(memory_stream); 15 }
标签:
原文地址:http://www.cnblogs.com/593213556wuyubao/p/5613450.html