ConstructorBuilder::GetCustomAttributes Method (Boolean)

 

Returns all the custom attributes defined for this constructor.

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

public:
virtual array<Object^>^ GetCustomAttributes(
	bool inherit
) override

Parameters

inherit
Type: System::Boolean

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

Return Value

Type: array<System::Object^>^

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

Exception Condition
NotSupportedException

This method is not currently supported.

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 CreateType, retrieve the constructor by calling the GetConstructor method on the returned type, and then call the GetCustomAttributes method on the returned ConstructorInfo.

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