Scott said:
</snip>
I think what he meant was that, if the number of properties of the object
you are serializing changes, deserialization doesn't work. This is a
problem I see in my development as a class definition evolves-- no big deal
in development, but it could be a problem in a production environment.
If anyone has any solutions for deserializing an object that has more
properties now than when it was serialized, please let me know (via ng).
Scott
You mean, if you have a class A.
Then serialize it to disk.
Then add an extra property to the definition of class A, making it class
B with the same name however.
And then you attempt to deserialize previously serialized class A from
disk into a class of type B with the same name it will fail.
In other words, if you try to deserialize a class that was serialized
with the old definition it wont work?
If thats the case I guess it shouldn't work...
Is there a way to check the type of an object (the data in the file)
before deserializing it? If yeah than you can simply deserialize into
the 'old' version of the class and then assign the values to the new
type of class and serialize again.