Maintain object references through Serialize/Deserialize

后端 未结 4 1049
渐次进展
渐次进展 2021-01-20 19:57

When serializing, I would like to serialize an object only once, then any references to that object should be serialized as a reference to the object. This is because, when

4条回答
  •  一个人的身影
    2021-01-20 20:22

    If you're using .NET 3 or later, you should use the DataContractSerializer and set PreserveObjectReferences to true.

提交回复
热议问题