DotNext by Roman Sakno

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

 Box<T>

public struct Box<T> : IEquatable<Box<T>> where T : struct
Typed representation of the boxed value type.
public bool IsEmpty { get; }

Indicates that this container hold no reference.

public ref T Value { get; }

Gets a managed pointer to the boxed value type.

public Box(object boxed)

Wraps the reference to the boxed value type.

public Box(T value)

Creates boxed representation of the specified value type.

public static bool op_Equality(Box<T> x, Box<T> y)

Determines whether the two containers store the references to the same boxed value.

public static T op_Explicit(Box<T> box)

Unboxes the reference value.

public static bool op_Inequality(Box<T> x, Box<T> y)

Determines whether the two containers store the references to the different boxed values.

public bool Equals(Box<T> other)

Determines whether this container holds the same reference as the specified container.

public ref T GetPinnableReference()

Gets pinnable managed pointer to the boxed object.