Method Cast
Cast<TResult>()
If this maybe is empty, returns an empty Maybe{TResult}. If this maybe is not empty, casts it's value to TResult and returns a new maybe containing the result. If the cast fails, an empty Maybe{TResult} is returned.
Declaration
public Maybe<TResult> Cast<TResult>()
Returns
Type | Description |
---|---|
Maybe<TResult> | A Maybe{TResult} instance. |
Type Parameters
Name | Description |
---|---|
TResult | The type to cast to. |