/// <summary>
/// 对对象进行深度拷贝
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
private object Clone(object obj)
{
MemoryStream memory_stream = new MemoryStream();
BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(memory_stream,obj);
memory_stream.Position = ; return formatter.Deserialize(memory_stream);
}
相关文章
- 10-29c#:如何处理对对象进行深度拷贝