What are the methods of implementing version compatibility with .NET serialization?
If you mean with BinaryFormatter (which is usually where this kicks) - don't; it isn't (IMO) suitable for storage - only for transport (and versioning is much less an issue here, as you probably control both ends of the pipe). Many other serializers of every variety are available; most of them cope just fine with versioning.
Personally, I would go for:
With any of these, you should be fine between versions, adding members, renaming fields, etc.
Actually, I'd use the above 3 even if I was just transporting (not storing).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With