Class generation using XSD RRS feed

  • Question

  • Hello,

    I am trying to create a class from a schema XSD file using xsd.exe. I get a C# file generated without error, but the file has got number of partial classes - instead of one single class.

    Can anyone please tell what in the XSD determines whether one class should be generated - or number of partial classes. I have to serialise this class, so I am not sure how I can do this with multiple partial classes.

    Many Thanks

    Friday, October 29, 2010 1:03 PM


  • Look for the class with an [XmlRoot] attribute, that is the starting point. It will have properties of the types of some other classes (which again can have properties of the types of other classes and so on).
    MVP Data Platform Development My blog
    • Marked as answer by Gunnerz Sunday, October 31, 2010 8:56 AM
    Friday, October 29, 2010 2:29 PM