Re: Serialization Question
I'm assuming you are using Binary Serialization. Use XML Serialization instead, which is usually not affected by the changes to the class (unless of course a lot has changed to make that information unusable)
Re: Serialization Question
There would be a weird workaround, which would be to make a converter. You would have to retain the old class and the new class as two separate things with a method to convert one to the other. You would then deserialize the old class, run the method, then serialize the new class. This would require more discipline than anything else. If your class was in a dll, it probably wouldn't be particularly difficult, but it would be a pain if you had it in the main program.
PS: While XML serialization might solve the problem, it isn't exactly a replacement. If you use that, you have to accept the XML nature of the data, which means files that are easily read and altered by anybody unless you encrypt them, and they will be relatively HUGE. Furthermore, I seem to remember that there were some real limitations to XML serialization, though I don't remember what they were. Some types of collections wouldn't serialize correctly.
Re: Serialization Question
Very clever "converter" idea!. I'll have to think about what's better: just to spend time recreating stuff in my game or making a better long term solution by trying your idea.
Also, XML serialization is not the answer for my situation for the reasons you stated Shaggy Hiker.
Thank you both for your ideas. I'll let this thread run another day and then mark it Solved.