You have a number of options... if you want to serialize a class that extends a base class, then that base class must also be marked with the Serializable
attribute. You can however add theNonSerialized
attribute to members of the base class that you do not want to be serialized.
If this is still not right for you, you can try some custom serialization by implementing the ISerializable
interface, providing you with more control over exactly what is serialized. Please take a look at the Object Serialization in the .NET Framework page at MSDN for more help on this subject.