I am trying to use FSharpChoice type in a C# project. I have created a choice like so
var a = FSharpChoice.NewChoice1Of3(instofT
I recently started a project to make a "compatibility layer" so that FSharp.Core can be more easily consumed from C#. In particular, it makes generic discriminated unions usable from C#, for example:
var choice = Choice.New1Of3(100);
int r = choice.Match(i => i + 21, s => s.Length + 1, s => s.Length + 5);
This does pattern matching on the discriminated union, similarly to how you would do it in F#, except there are no names.