Class Ref<T>
Pack the value into the box so that it is passed by reference
Inheritance
System.Object
Ref<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 Ref<T> : IRef<T>, IBox<T>, IDeref<T>, IEquatable<Ref<T>>
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceRef(T)
Pack the value into the box so that it is passed by reference
Declaration
public Ref(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 Ref<T>)
Declaration
public static implicit operator Ref<T>(T b)
Parameters
Type | Name | Description |
---|---|---|
T | b |
Returns
Type | Description |
---|---|
Ref<T> |
Implicit(Ref<T> to T)
Declaration
public static implicit operator T(Ref<T> s)
Parameters
Type | Name | Description |
---|---|---|
Ref<T> | s |
Returns
Type | Description |
---|---|
T |
Implements
System.IEquatable<T>
Extension Methods
Sugar.Borrow<T>(T)
Sugar.Owner<T>(T)