Is it possible to force xsd.exe to generate auto-implemented properties instead of the ugly manually implemented code which xsd.exe generates?
public abstract partial class SomeClass {
private string valueField;
/// <remarks/>
[System.Xml.Serialization.XmlTextAttribute()]
public string Value {
get {
return this.valueField;
}
set {
this.valueField = value;
}
}
}
It seems XML Schema Definition Tool (Xsd.exe) does not support generating auto-implemented properties.
But there is an alternative: Xsd2Code community edition. From feature list:
Support automatic properties when no special get or set is required.
Related answer: XSDObjectGen.exe vs XSD.exe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With