Class Box<T>
Pack the value into the box so that it is passed by reference
Inheritance
System.Object
Box<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LibSugar
Assembly: LibSugar.dll
Syntax
public class Box<T> : IBox<T>, IDeref<T>, IEquatable<Box<T>>
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceBox(T)
Pack the value into the box so that it is passed by reference
Declaration
public Box(T Value)
Parameters
Type | Name | Description |
---|---|---|
T | Value |
Properties
| Improve this Doc View SourceDeref
Declaration
public T Deref { get; }
Property Value
Type | Description |
---|---|
T |
Value
Declaration
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T |
Operators
| Improve this Doc View SourceImplicit(T to Box<T>)
Declaration
public static implicit operator Box<T>(T b)
Parameters
Type | Name | Description |
---|---|---|
T | b |
Returns
Type | Description |
---|---|
Box<T> |
Implicit(Box<T> to T)
Declaration
public static implicit operator T(Box<T> s)
Parameters
Type | Name | Description |
---|---|---|
Box<T> | s |
Returns
Type | Description |
---|---|
T |
Implements
System.IEquatable<T>
Extension Methods
Sugar.Borrow<T>(T)
Sugar.Owner<T>(T)