Method
UnwrapOr
func UnwrapOr<T>(defaultValue: T) -> T
Declaring type: OptionalOperators
Module: System
Assembly: System.Runtime.dll
Extension from OptionalOperators.UnwrapOr
Returns the successful value, or the supplied fallback value.
Parameters
| Name | Type | Description |
|---|---|---|
self |
Optional<T> | The source outcome or iterable on which the extension operates. |
defaultValue |
T | The fallback returned when no successful value is available. |
Return value
T