Hi!
I've been looking around for a simple example of the "right way" to implement immutable object xml serialization/deserialization.
The obvious problem is that the immutable object's properties are made read-only by omitting the setter, while private fields are made read-only by using the readonly keyword.
Since IXmlSerializable.ReadXml(System.Xml.XmlReader reader) requires the object inner state to be changed, I have to make private fields writable, which I would like to avoid. I've tried googling it but was unable to find the answer I was looking for.
Thanks a lot,
Veki