0
如果我定義我的類型,像這樣:C#WCF繼承[DataContract]
public class UniqueNamedItem
{
int Id {public get; protected set;}
int Name {public get; protected set;}
}
[DataContract]
public class Product : UniqueNamedItem
{
[DataMember]
//lots of properties and members etc
}
我是否需要添加[DataContract]和[的DataMember]屬性的基類,以利用這些特性,通信成員?或者這是自動添加的,因爲派生類型是DataContract?