ConstructorBuilder.IsDefined Method (Type, Boolean)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Checks if the specified custom attribute type is defined.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public override bool IsDefined(
	Type attributeType,
	bool inherit
)

Parameters

attributeType
Type: System.Type

A custom attribute type.

inherit
Type: System.Boolean

Controls inheritance of custom attributes from base classes. This parameter is ignored.

Return Value

Type: System.Boolean

true if the specified custom attribute type is defined; otherwise, false.

Exception Condition
NotSupportedException

This method is not currently supported. You can retrieve the constructor using GetConstructor and call IsDefined on the returned ConstructorInfo.

See the metadata specification for details on how to format binaryAttribute.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: