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.
A simple, no-overhead, value-type wrapper around Object to mimic Algebraic Data Types on C#
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
.NET port of Francisco (Paco) Estévez's JavaSealedUnions (https://github.com/pakoito/JavaSealedUnions).
Enums with payloads. Or for the fancy pants: discriminated unions for C# with compile-time exhaustiveness checking, implemented using closed type hierarchies.
A extremely simple library that provides a discriminated union type enhanced with fluent extensions for .NET.
This package provides Discriminated Unions for C# with an opportunity inherit from built in type and create custom Union Type.
a small proof that C# can have DUs using simple language constructs
A library that provides functionality to define a Discriminated Union in C# via Source Generators.
A dead simple library for parsing discriminated unions in Go.
Easy to use F#-like ~discriminated~ unions for Unity with exhaustive compile time matching
Extensions for https://github.com/mcintyre321/OneOf that expose XOrResonWhyNot extension methods for LINQ
A very simple discriminated union of success or error
A library for defining and manipulating algebraic data types in TypeScript.
A discriminated union source generator for C#
A TypeScript datatype representing network state which takes advantage of discriminated unions
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.
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."