DotNext by Roman Sakno

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

 Variant<T1, T2, T3, T4>

public struct Variant<T1, T2, T3, T4> : IVariant, IDynamicMetaObjectProvider, IOptional, IEquatable<Variant<T1, T2, T3, T4>>
Represents value that can be one of three possible types.
public bool IsPresent { get; }

Indicates that this container stores non-null value.

public Variant(T1 value)

Creates a new variant value from value of type T1.

public Variant(T2 value)

Creates a new variant value from value of type T2.

public Variant(T3 value)

Creates a new variant value from value of type T3.

public Variant(T4 value)

Creates a new variant value from value of type T4.

public static bool op_Equality(Variant<T1, T2, T3, T4> first, Variant<T1, T2, T3, T4> second)

Determines whether the two variant values are equal.

public static T1 op_Explicit(Variant<T1, T2, T3, T4> var)

Converts variant value into type T2.

public static T2 op_Explicit(Variant<T1, T2, T3, T4> var)

Converts variant value into type T2.

public static T3 op_Explicit(Variant<T1, T2, T3, T4> var)

Converts variant value into type T3.

public static T4 op_Explicit(Variant<T1, T2, T3, T4> var)

Converts variant value into type T4.

public static bool op_False(Variant<T1, T2, T3, T4> variant)

Indicates that variant value is null value.

public static Variant<T1, T2, T3, T4> op_Implicit(T1 value)

Converts value of type T1 into variant.

public static Variant<T1, T2, T3, T4> op_Implicit(T2 value)

Converts value of type T2 into variant.

public static Variant<T1, T2, T3, T4> op_Implicit(T3 value)

Converts value of type T3 into variant.

public static Variant<T1, T2, T3, T4> op_Implicit(T4 value)

Converts value of type T4 into variant.

public static Variant<T1, T2, T3, T4> op_Implicit(Variant<T1, T2, T3> variant)

Converts variant value of three possible types into variant value of four possibles types.

public static Variant<T1, T2, T3, T4> op_Implicit(Variant<T1, T2> variant)

Converts variant value of two possible types into variant value of four possibles types.

public static bool op_Inequality(Variant<T1, T2, T3, T4> first, Variant<T1, T2, T3, T4> second)

Determines whether the two variant values are not equal.

public static bool op_True(Variant<T1, T2, T3, T4> variant)

Indicates that variant value is non-null value.

public bool Equals<V>(V other) where V : IVariant

Determines whether the value stored in this variant container is equal to the value stored in the given variant container.

public Variant<T4, T1, T2, T3> Permute()

Change order of type parameters.