Skip to content

Methods_T_CodeJam_ValueOption_1

Andrew Koryavchenko edited this page Jul 4, 2017 · 3 revisions

ValueOption(T) Methods

The ValueOption(T) generic type exposes the following members.

Methods

 

Name Description
Public method Equals(Object) Indicates whether this instance and a specified object are equal. (Overrides ValueType.Equals(Object).)
Public method Equals(ValueOption(T)) Indicates whether the current object is equal to another object of the same type.
Public method GetHashCode Returns the hash code for this instance. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Returns the fully qualified type name of this instance. (Overrides ValueType.ToString().)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method Do(T) Calls someAction if option has value, and noneAction otherwise. (Defined by Option.)
Public Extension Method GetValueOrDefault(T)(T) Overloaded.
Returns value of option, or defaultValue if option hasn't it. (Defined by Option.)
Public Extension Method GetValueOrDefault(T, TResult)(Func(IOption(T), TResult), Func(TResult)) Overloaded.
Calls someSelector if option has value, and noneSelector otherwise. (Defined by Option.)
Public Extension Method With(T, TResult)(Func(T, TResult)) Overloaded.
Converts option value to another option with selectFunc. (Defined by ValueOption.)
Public Extension Method With(T, TResult)(Func(T, TResult), TResult) Overloaded.
Converts option value to another option with selectFunc. (Defined by ValueOption.)
Public Extension Method With(T, TResult)(Func(T, TResult), Func(TResult)) Overloaded.
Converts option value to another option with selectFunc. (Defined by ValueOption.)
  Back to Top

See Also

Reference

ValueOption(T) Structure
CodeJam Namespace

Clone this wiki locally