I used xsd.exe to create a class from xml schema. It generated several partial classes say one of which is Apple. I have added few fields to Apple. Now I want to serialize the object back to XML, but only according to the original schema. I want to skip the fields that I have introduced.
Any directions?
IIRC you just need to decorate the new fields with [XmlIgnore]
http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlignoreattribute.aspx