TypeDelegator.IsDefined Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Indicates whether a custom attribute identified by attributeType is defined.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Overrides Function IsDefined ( _ attributeType As Type, _ inherit As Boolean _ ) As Boolean
Parameters
- attributeType
- Type: System.Type
Specifies whether to search this type's inheritance chain to find the attributes.
- inherit
- Type: System.Boolean
An array of custom attributes identified by type.
Return Value
Type: System.Booleantrue if a custom attribute identified by attributeType is defined; otherwise, false.
Implements
ICustomAttributeProvider.IsDefined(Type, Boolean)| Exception | Condition |
|---|---|
| ArgumentException | attributeType is Nothing. |
| ReflectionTypeLoadException | The custom attribute type cannot be loaded. |
Show: