//对象深拷贝 public static T Copy<T>(T oldObject) where T : class,new() { T newOrder = new T(); MemoryStream stream = new MemoryStream(); BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(stream, oldObject); stream.Position = 0; newOrder = (bf.Deserialize(stream) as T); return newOrder; }