Enhanced C#
Language of your choice: library documentation
Public fields | Public Member Functions | Static Public Member Functions | List of all members
Loyc.Holder< T > Class Template Reference

A trivial class that holds a single value of type T in the Value property. More...


Source file:
Inheritance diagram for Loyc.Holder< T >:
Loyc.IHasValue< T >

Remarks

A trivial class that holds a single value of type T in the Value property.

This class is useful mainly as an alternative to standard boxing. When you box a structure in C#, you lose access to the members of that structure. This class, in contrast, provides access to the "boxed" value. This type is different from the standard Tuple{T} in that the Value is a mutable field.

Public fields

Value
 Any value of type T. More...
 

Public Member Functions

 Holder (T value)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 

Static Public Member Functions

static implicit operator Holder< T > (T value)
 

Additional Inherited Members

- Properties inherited from Loyc.IHasValue< T >
Value [get]
 

Member Data Documentation

T Loyc.Holder< T >.Value

Any value of type T.