<PackageReference Include="System.Reflection.Emit" Version="4.7.0-preview2.19523.17" />

EnumBuilder

public sealed class EnumBuilder : TypeInfo
Describes and represents an enumeration type.
public FieldBuilder UnderlyingField { get; }

Returns the underlying field for this enum.

Gets a TypeInfo object that represents this enumeration.

public FieldBuilder DefineLiteral(string literalName, object literalValue)

Defines the named static field in an enumeration type with the specified constant value.

public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)

Sets a custom attribute using a specified custom attribute blob.

public void SetCustomAttribute(CustomAttributeBuilder customBuilder)

Sets a custom attribute using a custom attribute builder.