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.
AlexanderI've ended up with IXmlSerializable.
精彩评论