My target is serialize c# classes to XML with attribute order like properties order in my classes. For this purporse I need add System.Xml.Serialization.XmlElementAttribute(Order=int) before other property in my class.
[System.Xml.Serialization.XmlElementAttribute("F4INVAL", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)]
public F4invalType[] F4INVAL {
get {
return this.f4INVALField;
}
set {
this.f4INVALField = value;
}
}
I have XSD-file (f4form_2012_3.xsd).
Using Xsd.exe (http://msdn.microsoft.com/en-en/library/x6c1kb0s.aspx) I execute this scriptlet to generate a set of C# classes:
xsd f4form_2012_3.xsd /order /classes
I need to get class properties with C# attribute [System.Xml.Serialization.XmlElementAttribute(Order=1)]
. And I do, but the first class' properties have this attribute.
The second and following classes don't have it.
Plase check f4form_2012_3.cs
What does it mean?