Mono Class Library: System.Attribute Overview | Members

System.Attribute.GetCustomAttributes Method

Returns an array of all custom attributes in the metadata for the specified member.

public static Attribute[] GetCustomAttributes (System.Reflection.MemberInfo element)

Parameters

element
An instance of a type derived from System.Reflection.MemberInfo that describes a type member.

Returns

A Attribute array containing all custom attributes that are applied to element. The array includes custom attributes that are inherited by element, if any. Returns an empty array if no custom attributes were found in the metadata for element .

Exceptions

TypeReason
ArgumentNullExceptionelement is null.
NotSupportedExceptionelement does not represent a constructor, method, property, event, type, or field member.

Remarks

Documentation for this section has not yet been entered.

Requirements

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