XmlSerializer - Ignoring inherited unserializable member
问题 Assume you have two classes, one inherits the other and the child needs to be serialized / deserialized with XmlSerializer. However, the parent contains a member that is not serializeable, say a dictionary. public class Parent { public Dictionary<string, int> dictionary; } The parent class is a library used for many other scripts. It cannot be modified. Now the child class contains only serializable members: public class Child : Parent { [XmlElement] public int foo; } When trying to call the