The base class will only contain methods.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you don’t change the version number of containing assembly then adding base class shouldn’t be a problem for binary serialization and for XML it doesn’t matter at all since it is very loosly coupled with actual type.
Just make sure that the base is also marked [Serializable] for binary serialization.
I’ve just tested and confirmed this.
Serialized the following class with Binary Formatter
Got the following base64 encoded output:
Then added following base class for Test:
And de serialized the base64 encoded thing again successfully without problems.