Test additional content header

OptionOfTEnum Method

Creates an instance of an Option prepresenting provided Enum value.

Definition

Namespace: Fluent.Calculations.Primitives.BaseTypes
Assembly: Fluent.Calculations.Primitives (in Fluent.Calculations.Primitives.dll) Version: 1.1.0-aplha
public static Option<TEnum> Of<TEnum>(
	TEnum primitiveValue,
	string fieldName = "NaN"
)
where TEnum : struct, new()

Parameters

primitiveValue  TEnum
Value of the option.
fieldName  String  (Optional)
Automaically captured name of declaring property which will be used as a name of the Option.

Type Parameters

TEnum
Underlying Enum type.

Return Value

OptionTEnum
Option value instance.

See Also