C# doesn't support multiple return types from methods, as an alternative use Discriminated Unions with ErrorOr library.
-
Updated
Jul 6, 2023 - C#
C# doesn't support multiple return types from methods, as an alternative use Discriminated Unions with ErrorOr library.
This package provides Discriminated Unions for C# with an opportunity inherit from built in type and create custom Union Type.
Extensions for https://github.com/mcintyre321/OneOf that expose XOrResonWhyNot extension methods for LINQ
A simple, no-overhead, value-type wrapper around Object to mimic Algebraic Data Types on C#
Discriminated Unions including Maybe (an option type) and Result for javascript with fewer bugs
a small proof that C# can have DUs using simple language constructs
A collection of Blazor components for working with OneOf discriminated unions
My solutions to problems of Code Jam 2021.
Easy to use discriminated unions for Java with compile time matching
A research programming language on top of C macros
A TypeScript datatype representing network state which takes advantage of discriminated unions
.NET port of Francisco (Paco) Estévez's JavaSealedUnions (https://github.com/pakoito/JavaSealedUnions).
A dead simple library for parsing discriminated unions in Go.
Easy to use F#-like ~discriminated~ unions for Unity with exhaustive compile time matching
PrimeFuncPack Core.Taggeds is a core pack for .NET consisting of fundamental tagged types targeted for use in functional programming: Optional and Result monads, Tagged Union, as well as the convert extensions.
Advanced converters for the System.Text.Json serializer
A very simple discriminated union of success or error
A library for defining and manipulating algebraic data types in TypeScript.
Unsupervised Learning
Add a description, image, and links to the discriminated-unions topic page so that developers can more easily learn about it.
To associate your repository with the discriminated-unions topic, visit your repo's landing page and select "manage topics."