Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

async await c#

// simple method structure
public static  Task<int> FooAsync(int num)
{
   num+=5;
   return Task.FromResult(num);
}
// calling function structure
public static async void Solve()
{
    var temp = await FooAsync(i);
}
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #async #await
ADD COMMENT
Topic
Name
8+2 =