I've got a class that will undergo certain version changes over the course of time.
The data from inside this class is serialized and deserialized as part of the startup of my application. The problem I have is if I update the class by adding more properties, and then start the application, the old data does not get loaded properly.
What I'm looking to do is override the deserialization step, I don't mind manually reconstructing the object from xml, as I have a version number stored and can use it to recursively update versions of the object.
Is there an interface I can implement, or an attribute I can set somewhere, to be able to do this?
If you can't think of a way to do what I want, are there alternatives? such as defaulting values for properties that may not exist in the version of the xml I am loading.