I have generated classes from XSD using the “XSD.exe /c” command line. Partial classes were generated, so I “completed” them by adding classes with the same name, which allowed me to add additional properties. However, the value of these properties are being included whenever I serialise data back into XML files. Does anyone know how to prevent this, perhaps via an attribute?
Thanks very much,
Nick Hill
actually (for completeness only), you can also do this by two other name-based patterns – you just wouldn’t in this scenario – they are designed for conditionally including data during serialization, and (in the second example) disambiguating between “explicitly deserialized to the default” vs “not in the deserialization source”:
or