如何动态获取所有继承自 Person 类(Student、Teacher)的非泛型类和 Person 类的属性(Address)。
示例代码:
[DataContract]
[KnownType(typeof(Student))]
[KnownType(typeof(Teacher))]
public abstract class Person {
[DataMember]
public string Name { get; set; }
[DataMember]
public string Surname { get; set; }
[DataMember]
public Address _Address { get; set; }
}