Issue
What does it mean to put a DataMemberAttribute on an interface member? How does this affect derived classes?
Solution
As shown in the following signature, the DataMember attribute is not inheritable
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, Inherited = false,
AllowMultiple = false)]
public sealed class DataMemberAttribute : Attribute
Therefore, it makes very little sense to decorate interface members with this attribute as you will have to decorate the implementing classes' members with this attribute too.
Answered By - vc 74 Answer Checked By - Timothy Miller (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.