Skip to content

M_CodeJam_Option_SomeHasValue__1_1

Andrew Koryavchenko edited this page Jun 17, 2018 · 5 revisions

Option.SomeHasValue(T) Method (T)

Creates instance of Option with specified value, if value not null.

Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static Option<T> SomeHasValue<T>(
	T value
)
where T : class

VB

Public Shared Function SomeHasValue(Of T As Class) ( 
	value As T
) As Option(Of T)

F#

static member SomeHasValue : 
        value : 'T -> Option<'T>  when 'T : not struct

Parameters

 

value
Type: T
Value

Type Parameters

 

T
Type of value

Return Value

Type: Option(T)
Instance of Option with value, if value not null, or instance without value.

See Also

Reference

Option Class
SomeHasValue Overload
CodeJam Namespace

Clone this wiki locally