If you change the field names and , to read the old data , serialized before your changes, then this can become messy. BinaryFormatter- This is basically a field serialized (personalized) serializer and it will not be happy. Changing properties and methods should be fine if it is not referenced by external code (and be sure to run your unit tests). Viable options at this point: manual serialization ( ISerializable) and serialization surrogates. A lot of pain.
If you use XmlSerializer/ DataContractSerialializer, you can name the serialization name separately for the member name, so itβs very easy to fix. And some other serializers don't use names at all; -p
XmlSerializer example:
[XmlElement("Color")]
public string Colour {get;set;}
source
share