If you have classes inherit from one to another, serialization framework can not
know what entity is what type so you must declare this kind of relation by an
attribute which is KnownType.
Here is an exampe:
[DataContract][KnownType(typeof(B))]publicclass A
{[DataMember]publicstringValue{get;set;}}[DataContract]publicclass B : A
{[DataMember]publicstringOtherValue{get;set;}}
Hiç yorum yok:
Yorum Gönder