Are Method Attributes Inherited in C#?

后端 未结 3 1272
闹比i
闹比i 2021-01-01 09:58

Are attributes applied to an abstract method in a base class applied to the overridden versions in the child classes?

I hope the question is clear enough without an

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 10:38

    It depends on how the attribute itself is declared - see AttributeUsageAttribute.Inherited property.

提交回复
热议问题