Allows a method to return a value if it was successful, or return failure information if the operation was not successful.

Namespace: RightEdge.Common
Assembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)

Syntax

C#
[SerializableAttribute]
public sealed class ReturnValue<T>
Visual Basic
<SerializableAttribute>
Public NotInheritable Class ReturnValue(Of T)
Visual C++
[SerializableAttribute]
generic<typename T>
public ref class ReturnValue sealed
F#
[<SealedAttribute>]
[<SerializableAttribute>]
type ReturnValue<'T> =  class end

Type Parameters

T
The type of the value to be returned.

Remarks

This class allows a method to return a value if it was successful, or return failure information if the operation was not successful. If it was successful, the Value property will contain the return value. If it was not successful, the ReturnCode property will contain information about the failure. In this case, attempting to access the Value will cause an exception to be thrown.

Inheritance Hierarchy

System..::..Object
  RightEdge.Common..::..ReturnValue<(Of <(<'T>)>)>

See Also