I recently needed to add some custom code to a couple autogenerated classes that were created by xsd.exe. Unfortunatly, anytime you make changes to the XSD, xsd.exe overwrites changes made to the class. To insulate a custom code from xsd.exe, create a new class that simply inherits from the generated class, then add the custom code, methods, properties, etc to the inherited class and use it for all accesses to the data.

jeremiah's blog | 5029 reads