DEV Community

Discussion on: Pattern Matching F# Union Types in C# 7

Collapse
 
stuartblang profile image
Stuart Lang

Yeah, DUs are the biggest thing I miss when going back to C#, I would love that.

Can you not do case var x when x is Abc.A:? Nevermind, Abc.A looks like it's the value not the type, how odd...

You're right, the type that gets generated is a little wierd and inuntuative to consume from C#, that's why I created this post, I've been back to it every now and then over the last few months.