multiple objects C# serialization
I have an application which serializes several objects by iterating through them and giving the comand to the object to serialize itself into a stream.
The problem is that now in the second version of the application some of the objects have more members, so the deserialization from former versions will give errors.
I thought of using VTS but I am not sure it will work (most probably not). Anyone has any ideas how to fix this?
1 Attachment(s)
Re: multiple objects C# serialization
I wrote a class to avoid this problem. I have attached it (including a unit test that contains example code how to use it).
Re: multiple objects C# serialization
Thanks, but I don't think it will help much :( .
The stream is binary, and is a stream provided by another application through COM. So I can't read what variable is coming, I just have to guess by the order that the objects were written. And to make matters worse, the version of the application was not saved in the serialization stream.
I do not know what the original developer was thinking....