An open API service indexing awesome lists of open source software.

https://github.com/dcyuksel/result

Result Pattern in C#
https://github.com/dcyuksel/result

exception exception-handler exception-handling result-pattern

Last synced: 6 months ago
JSON representation

Result Pattern in C#

Awesome Lists containing this project

README

          

# Result

Result Pattern in C#
The Result Pattern is an alternative method for controlling flow. Traditionally, exceptions are used when errors occur: an exception is created and thrown, and the caller function catches the exception and handles it accordingly.

While this approach works, exceptions are slow and costly. Additionally, your code can become cluttered if you continually add new exceptions. Higher-level functions should not need to know the details of lower-level functions.

Therefore, using the Result Pattern is a more effective way to control flow. Examples can be found in the test project. For a more detailed explanation, please refer to the project site.

For further details, please visit the project site.