OptionSharp 0.1.3-alpha

This is a prerelease version of OptionSharp.
There is a newer version of this package available.
See the version list below for details.
dotnet add package OptionSharp --version 0.1.3-alpha
                    
NuGet\Install-Package OptionSharp -Version 0.1.3-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OptionSharp" Version="0.1.3-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OptionSharp" Version="0.1.3-alpha" />
                    
Directory.Packages.props
<PackageReference Include="OptionSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OptionSharp --version 0.1.3-alpha
                    
#r "nuget: OptionSharp, 0.1.3-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OptionSharp@0.1.3-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OptionSharp&version=0.1.3-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OptionSharp&version=0.1.3-alpha&prerelease
                    
Install as a Cake Tool

OptionSharp

Just another option to choose from.

If you are looking for stable, production ready lib you are better off using something like LanguageExt.Core.

Motivation

Most C# optional implementations use structs for better performance, which makes a lot of sense.

This lib instead uses separate classes to model optional objects. The benefit here is that "if" C# gets discriminated unions, then this model will fit in nicely and allow for idiomatic code.

So in short, at this point, its a gamble + fun side project to learn more about functional style in C# where performance is not a primary concern.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • 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
0.3.1 224 4/30/2025
0.2.5 210 8/24/2024
0.2.4 178 6/17/2024
0.2.1 169 5/10/2024
0.1.3-alpha 149 2/25/2024
0.1.0-alpha 145 2/11/2024