I often write my objects out to a database in xml form.
However, if I change the form of my objects, say by changing the name or by changing the fields, I can no longer read them from the database, which makes somewhat difficult the task of reading them, converting them to their new form, and writing them back out to the database.
I’d rather not have to rename my classes everytime I change something about them.
*Note: I am relying on C#’s XmlSerialization/Deserialization of objects for generating the Xml. Perhaps this is not desirable if I change the format of the objects.
If you implement the ISerializable interface on your objects, then you can implement custom serialization/deserialization routines that provide backwards compatibility with older versions of the objects.
See here for an example of how it can be done: ISerializable and backward compatibility