Visual Basic (Declaration) | |
---|---|
Public Shared Function FromError(Of T)( _ ByVal error As Exception _ ) As OperationResult(Of T) |
Visual Basic (Usage) | ![]() |
---|---|
Dim error As Exception Dim value As OperationResult(Of T) value = OperationResult.FromError(Of T)(error) |
C# | |
---|---|
public static OperationResult<T> FromError<T>( Exception error ) |
C++/CLI | |
---|---|
public: static OperationResult<T^>^ FromErrorgeneric<typename T> ( Exception^ error ) |
Parameters
- error
- The exception to store into the failed OperationResult.
Type Parameters
- T
- The type of the result value.
Return Value
A failed OperationResult.Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family