await visual studio 2019 code example
Example 1: do sum things after task return vb.net
using System;
using System.Threading;
using System.Threading.Tasks;
public class Example
{
public static void Main()
{
Thread.CurrentThread.Name = "Main";
Task taskA = new Task( () => Console.WriteLine("Hello from taskA."));
taskA.Start();
Console.WriteLine("Hello from thread '{0}'.",
Thread.CurrentThread.Name);
taskA.Wait();
}
}
Example 2: do sum things after task return vb.net
Parallel.Invoke(() => DoSomeWork(), () => DoSomeOtherWork());