this post was submitted on 10 Aug 2024
16 points (94.4% liked)

C Sharp

1532 readers
2 users here now

A community about the C# programming language

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

founded 1 year ago
MODERATORS
16
submitted 3 months ago* (last edited 3 months ago) by DrDeadCrash to c/csharp
 

A collection of tools for dealing with nulls, failures and the generic type issues that arise in this domain.

https://github.com/Andy3432344/SafeResults

I'm the author, let me know what you think!

*Edit: updated to show GitHub link, sorry!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] eluvatar 6 points 3 months ago (6 children)

At least for this specific example I don't know why I wouldn't use null instead of option and ?? As it's more clear what's happening as it's standard C#

Also in your example does the function to the right of | execute always?

[โ€“] DrDeadCrash 1 points 3 months ago

Check the edit on the post, I thought I had linked to the GitHub page but I guess the image overrides that.

Link: https://github.com/Andy3432344/SafeResults

load more comments (5 replies)