Table of Contents

HasAttributes Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/TypeExtensions.cs

HasAttributes(Type, params Type[])

Determines whether the specified type contains one or more of the specified attributeTypes.

public static bool HasAttributes(this Type type, params Type[] attributeTypes)

Parameters

type Type

The Type to extend.

attributeTypes Type[]

The attribute target types to be matched against.

Returns

bool

true if the specified type contains one or more of the specified attributeTypes; otherwise, false.

Exceptions

ArgumentNullException

type cannot be null -or- attributeTypes cannot be null.