Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TypeDelegator.IsDefined Method

Indicates whether a custom attribute identified by attributeType is defined.

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

public override bool IsDefined(
	Type attributeType,
	bool inherit
)

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)
_MemberInfo.IsDefined(Type, Boolean)

ExceptionCondition
ArgumentException

attributeType is null.

ReflectionTypeLoadException

The custom attribute type cannot be loaded.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft