PropertyBuilder::GetCustomAttributes Method (Type^, Boolean)

 

Returns an array of custom attributes identified by 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^

An array of custom attributes identified by type.

inherit
Type: System::Boolean

If true, walks up this property's inheritance chain to find the custom attributes.

Return Value

Type: array<System::Object^>^

An array of custom attributes defined on this reflected member, or null if no attributes are defined on this member.

Exception Condition
NotSupportedException

This method is not supported.

Reflect on the property's parent type using Type.GetType or Assembly.GetType, retrieve the Reflection property object from the type, and call PropertyInfo.GetCustomAttributes.

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