Home - YoussefSell/Result.Net GitHub Wiki

Result.Net

to get started using the library you can install it from the NuGet package manager Install-Package Result.Net

Result.Net is a library that exposes a Result object that allows you to encapsulate the execution status of an operation so that instead of throwing exceptions you return a result object that describes the status of the execution, this is a common pattern you may want to read this article "To Throw or To Return (Exceptions vs Result Object)?" for more details on when to use the Result Object pattern over exception and when not.

the library gives you three types of Result objects:

  1. Result: this type is used to describe the execution status of a void method with no return value.
  2. Result<>: this type is a generic type that drives from Result and is used to describe the execution status of a method with a return value.

Result Object Page:
check this page for more details on each Result object type.

helper methods page:
this page contains a detailed description of all methods that you can use to manipulate the Result Object.

Working with Exceptions:
On this page, you will learn how to combine exceptions with result objects.