IsDefined Method

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.

Namespace:  System.Reflection
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.Boolean
true if a custom attribute identified by attributeType is defined; otherwise, false.

Implements

ICustomAttributeProvider.IsDefined(Type, Boolean)

ExceptionCondition
ArgumentException

attributeType is Nothing.

ReflectionTypeLoadException

The custom attribute type cannot be loaded.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft