DotNext by .NET Foundation and Contributors

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

 BoxedValue<T>

public abstract class BoxedValue<T> where T : struct
Represents a typed representation of the boxed value type.
public ref T Value { get; }

Gets a reference to the boxed value.

public static BoxedValue<T> Box(T value)

Converts a value type to an object reference.

public static BoxedValue<T> GetTypedReference(object boxedValue)

Converts untyped reference to a boxed value into a typed reference.

public static BoxedValue<T> op_Explicit(T value)

Converts a value type to an object reference.

public static BoxedValue<T> op_Explicit(ref Nullable value)

Boxes nullable value type to an object.

public static T op_Implicit(BoxedValue<T> boxedValue)

Unboxes the value.

public static BoxedValue<T> TryBox(ref Nullable value)

Boxes nullable value type to an object.

public abstract bool Equals(object obj)

public abstract int GetHashCode()

public abstract string ToString()