3 ms·
It's possible to add DUs in C# today with some third party packages. - https://github.com/domn1995/dunet https://github.com/domn1995/dunet - https://github.co
by CharlieDigital 2y ago
It's possible to add DUs in C# today with some third party packages.
- https://github.com/domn1995/dunet https://github.com/domn1995/dunet
- https://github.com/mcintyre321/OneOf https://github.com/mcintyre321/OneOf
Quite good and ergonomic with the source generators removing a lot of the boilerplate.
I have a practical example here using OneOf with .NET Channels: https://chrlschn.dev/blog/2024/07/csharp-discriminated-unions-and-dotnet-channels/ https://chrlschn.dev/blog/2024/07/csharp-discriminated-union...
- jeremycarter 2y agoActually not a bad solution. Thanks for sharing