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