Struct Result<T>
- Namespace
- LfrlAnvil
- Assembly
- LfrlAnvil.Core.dll
Represents a result of an operation.
public readonly struct Result<T>
Type Parameters
T
Type of an optional value.
- Inherited Members
- Extension Methods
Properties
Exception
Optional Exception associated with this result.
public Exception? Exception { get; }
Property Value
Value
Optional value associated with this result.
public T? Value { get; }
Property Value
- T
Methods
ThrowIfError()
Rethrows the Exception, if it isn't null, otherwise does nothing.
public void ThrowIfError()
ToString()
Returns the fully qualified type name of this instance.
[Pure]
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
implicit operator Result(Result<T>)
Converts provided value
to Result.
[Pure]
public static implicit operator Result(Result<T> value)
Parameters
value
Result<T>Object to convert.