u/dupuis2387in r/dotnet • Recommends
On “Returning bool from all methods and using out for transferring data – Is this a good practice?”
Look into the OneOf library, that does discriminated unions. Vid info on how to use link to this video
#oneof#discriminatedunions#csharp
429K subscribers • 62 videos on Hallway
Intermediate. Assumes working knowledge.
70K views6 years ago2 recommendations
Programming languagesSoftware designC# and .NETFunctional programmingDesign patterns
Nick Chapsas explains how to use the OneOf library to implement F#-style discriminated unions for better return types in C#.
Become a Patreon and get source code access: patreon.com/nickchapsas Check out my courses: dometrain.com Hello everybody I'm Nick and in this video I wanna talk about a package called OneOf. This library provides F# style discriminated unions for C#, using a custom type OneOf. An instance of this type holds a single value, which is one of the types in its generic argument list. It might not be my personal favourite way of doing things but I think it is a good project and I want to give it some exposure because I can definitely see some people benefiting from it. Give OneOf a star: github.com/mcintyre321/OneOf Don't forget to comment, like and subscribe :) Social Media: Follow me on GitHub: bit.ly/ChapsasGitHub Follow me on Twitter: bit.ly/ChapsasTwitter Connect on LinkedIn: bit.ly/ChapsasLinkedIn #dotnet #csharp #oneofWhat people say. Recommended as a great guide on using the OneOf library to handle multiple return types in C#.
u/dupuis2387in r/dotnet • Recommends
On “Returning bool from all methods and using out for transferring data – Is this a good practice?”
u/david622in r/dotnet • Recommends
On “OneOf<>”