ParameterInfo.GetCustomAttributes Method (Type, Boolean)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the custom attributes of the specified type or its derived types that are applied to this parameter.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Overridable Function GetCustomAttributes ( _ attributeType As Type, _ inherit As Boolean _ ) As Object()
Parameters
- attributeType
- Type: System.Type
The custom attributes identified by type.
- inherit
- Type: System.Boolean
This parameter is ignored for objects of this type. See Remarks.
Return Value
Type: System.Object ()An array that contains all the custom attributes that are defined on this parameter and that are of the specified type or any of its subtypes.
Implements
ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)| Exception | Condition |
|---|---|
| ArgumentException | The type must be a type provided by the underlying runtime system. |
| ArgumentNullException | attributeType is Nothing. |
| TypeLoadException | A custom attribute type could not be loaded. |
This method ignores the inherit parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the Attribute.GetCustomAttributes method.