4 comments

  1. Very cool solution Raimond! And the attributes will be ignored when you use JSON instead of XML.

    I’m glad you picked up the challenge sander and I offered 😛

    willemm

  2. please let me know how to use [XmlSerializerFormat]
    for CollectionDataContract

    srinivas

  3. Hi srinivas, as te XmlSerializerFormat turns on “old-school” XmlSerializer behavior, you should use the attributes associated with that. In this case the XmlRootAttribute:

    [CollectionDataContract(Name=”Customers”, ItemName=”Customer”)]
    [XmlRoot(ElementName=”Customers”)]
    public class CustomerCollection : Collection
    {
    }

    Raimondb

  4. Great Article!
    You saved my day.

    andreas m

Comments are closed.