Allows a method to return a value if it was successful, or return
failure information if the operation was not successful.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
[SerializableAttribute] public sealed class ReturnValue<T> |
| Visual Basic (Declaration) |
|---|
<SerializableAttribute> _ Public NotInheritable Class ReturnValue(Of T) |
| Visual C++ |
|---|
[SerializableAttribute] generic<typename T> public ref class ReturnValue sealed |
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.