this post was submitted on 10 Aug 2024
17 points (94.7% liked)

C Sharp

1526 readers
31 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
17
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 

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
[–] [email protected] 1 points 2 months ago

The operator being applied to the ResultObject will always resolve to the Generic type that was specified as 'T in IResult. If the function is not successful the resolved value will be whatever value was supplied to the ResultObject constructor, the opt.None property will true and the opt.Some property will be false.