ofNull
Namespace: FsToolkit.ErrorHandling
Transforms a nullableValue
value to 'nullableValue Option
.
Function Signature
'nullableValue -> 'nullableValue Option
Examples
Example 1
let opt = Option.ofNull 1
// Some 1
Example 2
let opt = Option.ofNull null
// None
Last updated