Option 2.0.2

.NET Framework 3.5
There is a newer version of this package available.
See the version list below for details.
Install-Package Option -Version 2.0.2
dotnet add package Option --version 2.0.2
<PackageReference Include="Option" Version="2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Option --version 2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Option, 2.0.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Option as a Cake Addin
#addin nuget:?package=Option&version=2.0.2

// Install Option as a Cake Tool
#tool nuget:?package=Option&version=2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Binaries for the Option type.
       Visit https://github.com/tejacques/Option for an overview and usage examples.

Product Versions
.NET Framework net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.1 1,287,324 3/13/2015
3.0.0 2,090 3/24/2014
2.0.2 1,162 10/3/2013
2.0.0 1,038 9/29/2013

Version Release Notes:

       Version 2.0.2:
        - Fix DebuggerDisplay
        - Add Documentation to Option<T>.Some;

       Version 2.0.1:
        - Allow Some<T> to have its value updated.
        - OptionPatternMatcher's default value Option value is now Option.None.
        - Fix edge case inequality operator.

       Version 2.0.0:
        - Added functional pattern matching as a fluent API to Options in the form:
          var matcher = Option<T>.PatternMatch()
             .None(() => { /* Action when the Option is None */ })
             .Some(value, () => { /* Action when the Option is value */ })
             .Some((value) => { /* Action when the Option is Some<T> */ });

         matcher.Result(Option<T> option); /* Will run the appropriately matched action on the option */

         These are also present as instance functions on Option<T>:

         Option<int> option = getOptionFromMethodCall();

         var result = option.Match<string>()
             .None(() => "None")
             .Some(0, () => "Zero")
             .Some((value) => value.ToString())
             .Result();

        - Pattern matching matches one and only one pattern.
        - Tests have 100% code coverage.
        - New Some<T> and None<T> classes.

        - Breaking Changes:
          - From() method replaced with Some().
          - ToOption() extension method has been removed.

       Version 1.0.1:
        - Include documentation.

       Version 1.0.0:
        - Adds the Option type to the System.Option namespace.