DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="0.1.1" />

 Constant<T>

public abstract class Constant<T>
Allows to use constant values as generic parameters.
protected Constant(T constVal)

Initializes a new generic-level constant.

public static T Of<G>(bool intern = true) where G : Constant<T>

Extracts constant value from generic parameter.

public static T op_Implicit(Constant<T> const)

Extracts constant value.