System.Reflection.Emit.ConstructorBuilder.GetCustomAttributes Method

Returns all the custom attributes defined for this constructor.

Syntax

public override object[] GetCustomAttributes (bool inherit)

Parameters

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

Returns

Returns an array of objects representing all the custom attributes of the constructor represented by this System.Reflection.Emit.ConstructorBuilder instance.

Remarks

The inherit parameter is ignored because a class never inherits constructors from base classes.

To get the custom attributes, finish building the type by calling TypeBuilder.CreateType, retrieve the constructor by calling the Type.GetConstructor(Type[]) method on the returned type, and then call the System.Reflection.MemberInfo.GetCustomAttributes(bool) method on the returned System.Reflection.ConstructorInfo.

Requirements

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