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#
- Host: GitHub
- URL: https://github.com/dcyuksel/result
- Owner: dcyuksel
- License: mit
- Created: 2024-10-01T11:42:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-25T14:10:12.000Z (about 1 year ago)
- Last Synced: 2024-11-25T15:23:18.673Z (about 1 year ago)
- Topics: exception, exception-handler, exception-handling, result-pattern
- Language: C#
- Homepage: https://medium.com/@dnzcnyksl/result-pattern-in-c-b0513099466e
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.