Nothing is a type representing the absence of data, similarly to Unit
in
F#.
Use it as a return value from methods where you would traditionally return void
.
No new features will be added or bugs fixed unless requested through an issue.
If you wish to fork this repository and continue the work, you are very welcome
to do so.
Nothing
exposes a single static readonly instance called Nothing.atAll
. This
instance is equal to itself using both ==
and Equals
.
The package also includes a few useful extension methods which are listed below.
- Convert a
Task
to aTask<Nothing>
using theToNothingTask
method - Convert a
Action
to aFunc<Nothing>
using theToNothingFunc
method. Works with up to 3 parameters - Convert anything to
Nothing
with theDiscard
method