public object Clone() { object copy; using (MemoryStream ms = new MemoryStream()) { BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(ms, this); ms.Flush(); ms.Position = 0; copy = bf.Deserialize(ms); } return copy; }