Class EnumBuilder<TEnum>
Represents a custom enum object. This class cannot be inherited.
public sealed class EnumBuilder<TEnum> where TEnum : Enum
Type Parameters
TEnum
- Type of the enum.
- Inheritance
-
EnumBuilder<TEnum>
- Inherited Members
- Extension Methods
Properties
Value
The enum value corresponding to this builder.
public TEnum Value { get; }
Property Value
- TEnum
Methods
ToString()
Converts the value of this instance to a string.
public override string ToString()
Returns
- string
- A string whose value is the same as this instance.
Operators
explicit operator EnumBuilder<TEnum>(TEnum)
Converts an Enum object to EnumBuilder.
public static explicit operator EnumBuilder<TEnum>(TEnum @enum)
Parameters
enum
TEnum- The Enum object.
Returns
- EnumBuilder<TEnum>
- The constructed enum builder for the specified enum object.
implicit operator TEnum(EnumBuilder<TEnum>)
Converts an EnumBuilder to its corresponding enum object.
public static implicit operator TEnum(EnumBuilder<TEnum> enumBuilder)
Parameters
enumBuilder
EnumBuilder<TEnum>- The Enum Builder.
Returns
- TEnum
- The enum object equivalent to this instance.