Export (0) Print
Expand All

PropertyBuilder.GetCustomAttributes Method (Boolean)

Returns an array of all the custom attributes for this property. This method is not supported.

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

public override Object[] GetCustomAttributes(
	bool inherit
)

Parameters

inherit
Type: System.Boolean
true to walk up the property's inheritance chain to find the custom attributes; otherwise, false.

Return Value

Type: System.Object[]
An array of all the custom attributes.

Implements

ICustomAttributeProvider.GetCustomAttributes(Boolean)

ExceptionCondition
NotSupportedException

This method is not supported.

To get the custom attributes of a property, reflect on the property's parent type after the type is completed, using Type.GetType or Assembly.GetType. Retrieve the PropertyInfo object from the type, and call GetCustomAttributes on the PropertyInfo object.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft