I have to implement ISerializable in a derived class (to do some custom serialization/deserialization) but the parent class is marked as [Serializable]. The serialization "works" (I can serialize and deserialize without runtime errors) but it looks like the base class data isn't being preserved.
Is the fact that I'm implementing GetObjectData in the derived class negating the serialization of the base class? If so, do I have to implement ISerializable in the base class and then call base.GetObjectData(...) in the derived class to preserve the data or is there a better way than writing info.AddValue(...) 100 times?
edit> Thank you Tim. You confirmed what I suspected. The problem itself goes one step further. The base class in my case implements BindingList(T) which iteself doesn't implement ISerializable.
In the interim, for each property, I'll try: In the ISerializable constructor base.Property = info.GetValue(...);
and in the GetObjectDate info.AddValue("name", base.Property);
unless a better solution is put forward by the wonderful SO community.