Serialization byte array vs XML file

前端 未结 7 1862
礼貌的吻别
礼貌的吻别 2021-01-06 08:42

I am heavily using byte array to transfer objects, primitive data, over the network and back. I adapt java\'s approach, by having a type implement ISerializable, which cont

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-06 09:08

    Serialization (in Java) is deceptively simple. As long as you do simple stuff (like never change the class) it is easy - but there are a number of "fun" things with it too.

    Foe a good discussion on Java serialization look at Effective Java (specifically chapter 10).

    For C#, not sure, but likely the core issues are the same.

    There is an example here on C# serialization: http://www.codeproject.com/KB/cs/objserial.aspx.

提交回复
热议问题