T
The type of the result
Cocktail Help Reference
FromResult<T> Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > OperationResult Class : FromResult<T> Method



result
The result to store into the completed OperationResult.

Glossary Item Box

Creates an OperationResult<T> that is completed successfully with the specified result.

Syntax

Visual Basic (Declaration) 
Public Shared Function FromResult(Of T)( _
   ByVal result As T _
) As OperationResult(Of T)
Visual Basic (Usage)Copy Code
Dim result As T
Dim value As OperationResult(Of T)
 
value = OperationResult.FromResult(Of T)(result)
C# 
public static OperationResult<T> FromResult<T>( 
   T result
)
C++/CLI 
public:
static OperationResult<T^>^ FromResultgeneric<typename T>
( 
   T^ result
) 

Parameters

result
The result to store into the completed OperationResult.

Type Parameters

T
The type of the result

Return Value

A successfully completed OperationResult.

Requirements

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

See Also

© 2012 All Rights Reserved.