Delegate TryGet<TResult>
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
A method that gives a value if it can. It reports the result through its return value, and gives the value through an output parameter.
[PublicAPI]
public delegate bool TryGet<TResult>(out TResult result)
Parameters
resultTResultSet to the value produced when this returns true, and left at the default for its type otherwise.
Returns
Type Parameters
TResultThe type of the value produced.
- Extension Methods
Remarks
This gives the shape that the framework uses everywhere it has to say "there can be no answer" with no exception. That name is what lets FromTryGet<TResult>(TryGet<TResult>) change each such method into a Maybe<T>, and that includes ones this library knows nothing about.