Sunday, March 30, 2014

Return a Value from a Task

i used this but it genetrate an error while retreiving data



void async SomeMethod()
{
ServiceClient proxy = new ServiceClient();
Task<T> results = await proxy.CallAsync(param1, param2);
T result = results.Result;// here it generates the error
if (result.Success)
{
// Do something with result
}
}

No comments:

Post a Comment