Mono Class Library: System.Attribute Overview | Members

System.Attribute.IsDefined Method

Returns a bool value indicating whether a specified custom attribute is present in the metadata for the specified module.

public static bool IsDefined (System.Reflection.Module element, Type attributeType)

Parameters

element
A System.Reflection.Module instance.
attributeType
The Type of the custom attribute for which to check.

Returns

true if a custom attribute of type attributeType is applied to element ; otherwise, false.

Exceptions

TypeReason
ArgumentNullExceptionelement or attributeType is null.
ArgumentExceptionattributeType is not derived from Attribute.

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