EnumBuilder.DefineLiteralCore(String, Object) Method

Definition

When overridden in a derived class, defines the named static field in an enumeration type with the specified constant value.

C#
protected abstract System.Reflection.Emit.FieldBuilder DefineLiteralCore(string literalName, object? literalValue);

Parameters

literalName
String

The name of the static field.

literalValue
Object

The constant value of the literal.

Returns

The defined field.

Applies to

Product Versions
.NET 8, 9