Assembly.ICustomAttributeProvider.GetCustomAttributes Method

Definition

Overloads

ICustomAttributeProvider.GetCustomAttributes(Boolean)

Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.

ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)

Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.

ICustomAttributeProvider.GetCustomAttributes(Boolean)

Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.

C#
object[] ICustomAttributeProvider.GetCustomAttributes(bool inherit);

Parameters

inherit
Boolean

When true, look up the hierarchy chain for the inherited custom attribute.

Returns

Object[]

An array of Objects representing custom attributes, or an empty array.

Implements

Applies to

.NET Core 1.1 and other versions
Product Versions
.NET Core 1.0, Core 1.1
.NET Standard 1.5, 1.6

ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)

Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.

C#
object[] ICustomAttributeProvider.GetCustomAttributes(Type attributeType, bool inherit);

Parameters

attributeType
Type

The type of the custom attributes.

inherit
Boolean

When true, look up the hierarchy chain for the inherited custom attribute.

Returns

Object[]

An array of Objects representing custom attributes, or an empty array.

Implements

Applies to

.NET Core 1.1 and other versions
Product Versions
.NET Core 1.0, Core 1.1
.NET Standard 1.5, 1.6