Santa (e.g. Bill G). For Christmas can I get control of the xml serialization process?

When implementing ICollection in a strongly-typed collection, don't expect any pier properties to be serialized via XmlSerialization. MSDN was quite clear on this.

You can create your own collection classes by implementing the ICollection interface, and use the XmlSerializer to serialize instances of these classes. Note that when a class implements the ICollection interface, only the collection contained by the class is serialized.Any public properties or fields added to the class will not be serialized...

What a pain. I know. I know. I can create a strongly typed collection and add it as a property to another class but that is not what I want. This wouldn't be a big deal at all if I could implement IXmlSerializeable and do it myself but MS strongly recommends against it. IXmlSerializeable may get nixed in a subsequent release. In case anyone is wondering. Skonnard wrote a nice article that shows you the ease of getting hold of the xml serialization process http://msdn.microsoft.com/msdnmag/issues/03/06/XMLFiles/default.aspx. The article shows you how easy it is to do it....if you dare......

No Comments