public static void Main() { MySerializableClass2 original = new MySerializableClass2(); Debug.Print("original: " + original.ToString()); byte[] buffer = Reflection.Serialize(original, typeof(MySerializableClass2)); MySerializableClass2 restored = (MySerializableClass2)Reflection.Deserialize(buffer, typeof(MySerializableClass2)); Debug.Print("restored: " + restored.ToString()); Debug.Print("Number of bytes: " + buffer.Length.ToString()); Debug.Print(BufferToString(buffer)); }