ToList
Convert the Option<T>
to a List<T>
of length 0 or 1.
Parameters | Returns |
Option<T> option | List<T> |
Usage
Returns a List<T>
with a single element when the option value IsSome
. Otherwise returns an empty collection.
When option IsSome
When option IsNone
Last updated