开发者

How do I serialize read-only objects in silverlight?

I'm having a problem now: for serializing/deserializing an object which has only getters marked as public with DataContractSerializer I have to use [InternalsVisibleTo] attribute and to make setters internal.

How can I avoid this ugly workaround to get my read-only objects successfully serialized/deserialized? Implementing ISerializable/IXmlSerializable开发者_运维百科 is the last thing I want to do. Do I have any other ways to do this?

Thanks in advance.

Alexander


I've ended up with IXmlSerializable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜