ModuleBuilder.DefineEnumCore(String, TypeAttributes, Type) Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

When overridden in a derived class, defines an enumeration type that is a value type with a single non-static field called value__ of the specified type.

C#
protected abstract System.Reflection.Emit.EnumBuilder DefineEnumCore(string name, System.Reflection.TypeAttributes visibility, Type underlyingType);

Parameters

name
String

The full path of the enumeration type. name cannot contain embedded nulls.

visibility
TypeAttributes

A bitwise combination of the enumeration values that specifies the type attributes for the enumeration visibility. The attributes are any bits defined by VisibilityMask.

underlyingType
Type

The underlying type for the enumeration. This must be a built-in integer type.

Returns

The defined enumeration.

Applies to

Product Versions
.NET 8, 9, 10