Let say I have following classes:
public class Entity { ... }
public class MyEntity : Entity
{
}
MyEntity can be complex object, which has list of Entity as its property. I'd like to serialize MyEntity to xml, but only properties of base class, i.e Entity object. I tried to use DataContractSerializer with DataMemberAttribute, but it seems, starting with .NET 3.5 it serializes all public properties even if DataMemberAttribute is not applied.
What are my options?