Versionning and serialization
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I have a class that contains two variables. Class Toto { public int Var1; public string Var2; } I serialize this class through a binary formatter. Everything runs fine. Now, I want to add a new var to my class Class Toto { public int Var1; public string Var2; public string Var3; } If I try to deserialize my previously saved bin, I got an error. Is there a way to deserialize an "old version" of the class, reading only the fields that existed at the time of serialization, and leaving the new fields empty?