|
-
Mar 24th, 2012, 06:12 PM
#1
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.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|