469,917 Members | 1,834 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

serialization inherited objects


I have some questions that are a little difficult to explain, so I give it a

I have an application (aSP.NET with VB.NET codebehind) and I would like to
store my data on disk because the users could continue later on there
project with the same data already filled in.
So I would use the soap-serialization to store the info (the nested objects,
collections, ...). I think this process will work very well, also the
deserialization. But now the problems. It's almost certain that my app will
change a little bit within a few months. Some extra propertys in the objects
and so on. But it seeems that this will give problems with the
deserialization. Because older projects - that doesn't have the new
properties - must also keep worrking (loading in the data). And now I have
tested this with an simple class that has 3 properties. Serialized an
object. Then changed the classdefinition to 4 propertys and I received and

Now I would like some solution will the serialization keeps working. So I
thaught of inheritance.
The problem is, that in my app I would like to keep using my original name
for the objects. Say The class is "Person". In my app I have several
dim-statements "as Person". When I make an new object "Person1" that
inherits form "Person", I have to change my statements to. Also how does the
serialization works then. I have an older "person"-object, so I can't use
the deserialization of "Person1". When i load in the data I would have to
check by some way which kind of object was stored (is this possible), to
call even the correct deserialization method...

Hmm, not easy to explain the problem. What I would like to do: is it
possible to use older serialized data in an application after the definition
of the objects (nested objects) are changed. Can i simply desrialize the old
data? And can this be done with the same "method/procedure" as when i
deserialize data that is already in the correct (latest) version. And how to
solve the problem when the new version has to change again, to version 2...

I have seen some info about "versioning" and serialization, but It isn't
very clear to me right know. Maybe someone that has some clear
examples/info. Maybe something like my problem.

Hopefully somebody can help me with this 'little' problem

Thx very muh

Nov 20 '05 #1
0 1081

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by ron | last post: by
3 posts views Thread by Aaron Clamage | last post: by
1 post views Thread by Glenn Wilson | last post: by
2 posts views Thread by tony lock | last post: by
2 posts views Thread by Maximus | last post: by
10 posts views Thread by SStory | last post: by
4 posts views Thread by mijalko | last post: by
reply views Thread by JosAH | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.