ModuleBuilder.GetCustomAttributes Method

Definition

Returns the custom attributes that are applied to the current ModuleBuilder.

Overloads

GetCustomAttributes(Boolean)

Returns all the custom attributes that have been applied to the current ModuleBuilder.

GetCustomAttributes(Type, Boolean)

Returns all the custom attributes that have been applied to the current ModuleBuilder, and that derive from a specified attribute type.

GetCustomAttributes(Boolean)

Source:
ModuleBuilder.cs

Returns all the custom attributes that have been applied to the current ModuleBuilder.

C#
public override object[] GetCustomAttributes(bool inherit);

Parameters

inherit
Boolean

This argument is ignored for objects of this type.

Returns

Object[]

An array that contains the custom attributes; the array is empty if there are no attributes.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

GetCustomAttributes(Type, Boolean)

Source:
ModuleBuilder.cs

Returns all the custom attributes that have been applied to the current ModuleBuilder, and that derive from a specified attribute type.

C#
public override object[] GetCustomAttributes(Type attributeType, bool inherit);

Parameters

attributeType
Type

The base type from which attributes derive.

inherit
Boolean

This argument is ignored for objects of this type.

Returns

Object[]

An array that contains the custom attributes that are derived, at any level, from attributeType; the array is empty if there are no such attributes.

Exceptions

attributeType is null.

attributeType is not a Type object supplied by the runtime. For example, attributeType is a TypeBuilder object.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)