-
Notifications
You must be signed in to change notification settings - Fork 35
T_CodeJam_IOption_1
Andrew Koryavchenko edited this page Jun 17, 2018
·
5 revisions
IOption(T) InterfaceOption(T) and ValueOption(T) common interface.
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public interface IOption<out T>
VB
Public Interface IOption(Of Out T)
F#
type IOption<'T> = interface end
- T
- Type of optional 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 | |
---|---|---|
Do(T) | Calls someAction if option has value, and noneAction otherwise. (Defined by Option.) | |
GetValueOrDefault(T)(T) | Overloaded. Returns value of option, or defaultValue if option hasn't it. (Defined by Option.) |
|
GetValueOrDefault(T, TResult)(Func(IOption(T), TResult), Func(TResult)) | Overloaded. Calls someSelector if option has value, and noneSelector otherwise. (Defined by Option.) |