Represents the result of an operation.
Represents a result with a value of type TValue and a status code of type TStatus .
An
OVRResult<TStatus> is effectively an enum but with some additional machinery to test for success and to distinguish between a real value and a default-initialized value. This is important because an enum constant of zero is often used to indicate
Success.
For results that also contain a value, see
OVRResult<TValue, TStatus>.
OthersTStatusThe type of the status code.
OthersTValueThe type of the value.
TStatusThe type of the status code.
An
OVRResult<TValue, TStatus> represents the result of an operation which may fail. If the operation succeeds (
Success is true), then you can access the value using the
Value property.
If the operation fails (
Success is false), then the
OVRResult does not have a value, and it is an error to access the
Value property. In this case, the
Status property will contain an error code.