views:

42

answers:

1

I have a class and serialized into XML on hard disk. Then I add one new parameter into that class. Can I still able be de-serialize from old xml into new class structure by default de-serializer?

Any things else might affect serialization? Rename parameters ? Delete parameters ?

+2  A: 

I will assume by parameters you are referring to instance variables.

XMLSerializer will just put back the data it can find. Even if you removed (or renamed) a variable it will still be happy.

If however you are saying that you have added a parameter to the constructor just be aware that XMLSerializer requires a parameterless constructor.

BrendanS