方法是在C#中属性继承? [英] Are Method Attributes Inherited in C#?
本文介绍了方法是在C#中属性继承?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是在子类适用于重载版本的基类适用于一个抽象方法的属性?
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 example.
推荐答案
这要看该属性本身声明 - 见<一href=\"http://msdn.microsoft.com/en-us/library/system.attributeusageattribute.inherited.aspx\"><$c$c>AttributeUsageAttribute.Inherited$c$c>属性。
It depends on how the attribute itself is declared - see AttributeUsageAttribute.Inherited
property.
这篇关于方法是在C#中属性继承?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文