DotNext by .NET Foundation and Contributors

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

 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 ValueType op_Implicit(BoxedValue<T> boxedValue)

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

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

Boxes nullable value type to an object.

public BoxedValue<T> Copy()

Creates a bitwise copy of the boxed value.

public abstract bool Equals(object obj)

public abstract int GetHashCode()

public abstract string ToString()