Method As
As<TResult>()
If this maybe is empty, returns an empty Maybe{TResult}. If this maybe is not empty, use the as keyword to convert it's value to TResult and returns a new maybe containing the result.
Declaration
public Maybe<TResult> As<TResult>()where TResult : class
Returns
Type | Description |
---|---|
Maybe<TResult> | A Maybe{TResult} instance. |
Type Parameters
Name | Description |
---|---|
TResult | The type to cast to. |