//깊은 복사를 해주는 클래스

    public static class DeepCopy

    {

        public static T Clone<T>(T sorce)

        {

            BinaryFormatter formatter = new BinaryFormatter();

            Stream stream = new MemoryStream();

            formatter.Serialize(stream, sorce);

            stream.Seek(0, SeekOrigin.Begin);

            return (T)formatter.Deserialize(stream);

        }

    }


바이너리는 뭐고 바이너리 포매터는 뭐고 스트림은 뭘까 Serialize, Deserialize는 뭘까..