ControllerDescriptor.GetCustomAttributes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetCustomAttributes(Boolean) |
Retrieves custom attributes that are defined for this member, excluding named attributes. |
GetCustomAttributes(Type, Boolean) |
Retrieves custom attributes of a specified type that are defined for this member, excluding named attributes. |
GetCustomAttributes(Boolean)
Retrieves custom attributes that are defined for this member, excluding named attributes.
public virtual object[] GetCustomAttributes (bool inherit);
abstract member GetCustomAttributes : bool -> obj[]
override this.GetCustomAttributes : bool -> obj[]
Public Overridable Function GetCustomAttributes (inherit As Boolean) As Object()
Parameters
- inherit
- Boolean
true to look up the hierarchy chain for the inherited custom attribute; otherwise, false.
Returns
An array of custom attributes, or an empty array if no custom attributes exist.
Implements
Exceptions
The custom attribute type cannot be loaded.
There is more than one attribute of type attributeType
defined for this member.
Applies to
GetCustomAttributes(Type, Boolean)
Retrieves custom attributes of a specified type that are defined for this member, excluding named attributes.
public virtual object[] GetCustomAttributes (Type attributeType, bool inherit);
abstract member GetCustomAttributes : Type * bool -> obj[]
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overridable Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
Parameters
- attributeType
- Type
The type of the custom attributes.
- inherit
- Boolean
true to look up the hierarchy chain for the inherited custom attribute; otherwise, false.
Returns
An array of custom attributes, or an empty array if no custom attributes exist.
Implements
Exceptions
The custom attribute type cannot be loaded.
There is more than one attribute of type attributeType
defined for this member.
The attributeType
parameter is null (Nothing in Visual Basic).