ConstructorBuilder::GetCustomAttributes Method (Type^, Boolean)

 

Returns the custom attributes identified by the given type.

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

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

Parameters

attributeType
Type: System::Type^

The custom attribute type.

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 type Object representing the attributes of this constructor.

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: