-
Notifications
You must be signed in to change notification settings - Fork 35
T_CodeJam_Option_1
andrewvk edited this page Mar 22, 2016
·
9 revisions
[This is preliminary documentation and is subject to change.]
Represents a value type that can be assigned null.
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)
C#
public struct Option<T>
VB
Public Structure Option(Of T)
F#
[<SealedAttribute>]
type Option<'T> = struct end
- T
Name | Description | |
---|---|---|
Option(T) | Initializes a new instance to the specified value. |
Name | Description | |
---|---|---|
HasValue | Gets a value indicating whether the current object has a value. | |
Value | Gets the value of the current object. |
Name | Description | |
---|---|---|
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
Name | Description | |
---|---|---|
Implicit(T to Option(T)) | Creates a new object initialized to a specified value. |
Name | Description | |
---|---|---|
GetValueOrDefault(T) | Returns value of option, or defaultValue if option hasn't it. (Defined by OptionExtensions.) | |
Map(T, TResult) | Converts option value to another option with selectFunc. (Defined by OptionExtensions.) | |
Match(T)(Action(Option(T)), Action) | Overloaded. Calls someAction if option has value, and noneAction otherwise. (Defined by OptionExtensions.) |
|
Match(T, TResult)(Func(Option(T), TResult), Func(TResult)) | Overloaded. Calls someFunc if option has value, and noneFunc otherwise. (Defined by OptionExtensions.) |