Orx.Fun.Option Namespace

An option type for C# aiming to be explicit while concise.
  • Opt<T>: Some(T) or None.
In order to enable the types globally, add the following in project's global usings file:
C#
global using Orx.Fun.Option;
global using static Orx.Fun.Option.OptionExtensions;
and optionally the linq extensions via
C#
global using static Orx.Fun.Option.OptionExtensionsLinq;

Classes

Opt Static option constructors.
OptionExtensions Extension methods for the option type OptT.
OptionExtensionsLinq Extension methods for linq methods using the option type OptT.

Structures

OptT Option type which can be either of the two variants: Some(value-of-T) or None.