Mono Class Library: System.AttributeUsageAttribute Overview | Members

System.AttributeUsageAttribute.Inherited Property

Gets or sets a bool value indicating whether the attribute can be inherited by subclasses of the class to which the attribute is applied.

public bool Inherited { set; get; }

Value

true indicates the attribute is inherited by subclasses; otherwise, false. The default is true.

Remarks

Information on an inherited attribute will be included in the metadata for the class on which it is applied, but will not be included in the metadata for classes that derive from it. A metadata consumer (such as reflection) is required therefore to traverse up the inheritance chain of a class if that consumer is interested in Attribute data that is marked inherited, but applied to an ancestor class. There is nothing for the compiler to validate at compile time.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0