Share via


TaskExtensions.SyncResult<T> Method (Task<T>)

Namespace:  Microsoft.VisualStudio.Services.WebApi
Assembly:  Microsoft.VisualStudio.Services.WebApi (in Microsoft.VisualStudio.Services.WebApi.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function SyncResult(Of T) ( _
    task As Task(Of T) _
) As T
public static T SyncResult<T>(
    this Task<T> task
)
[ExtensionAttribute]
public:
generic<typename T>
static T SyncResult(
    Task<T>^ task
)
static member SyncResult : 
        task:Task<'T> -> 'T 
JScript does not support generic types or methods.

Type Parameters

  • T

Parameters

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Task<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

TaskExtensions Class

SyncResult Overload

Microsoft.VisualStudio.Services.WebApi Namespace