Possible duplicate:
Serializable Inheritance
Is serialization inherited?
Example:
[Serializable]
class A
{
}
class B : A
{
}
If I try to serialize / deserialize an instance of class B, I get an exception stating that the class is not marked as serializable. So the question is: is inheritance serialized? I just skipped how to do this, or does each class that needs to be serialized needs to be explicitly labeled as such?
source
share