I have an abstract class BaseClass with two attributes I want to share with class ClassA : BaseClass and class ClassB : BaseClass. However, I want both ClassA and ClassB to be marked with DataContractAttribute in a way that the members inherited from BaseClass are also exposed in the contract. However, I don’t want BaseClass itself to be exposed as a data contract. Is this possible in WCF (.NET 3.5)?
I have an abstract class BaseClass with two attributes I want to share with
Share
No, AFAIK that is not possible. Even if you
newthe properties to add data-member markers it’ll still complain: