using System; using System.Threading; using System.Threading.Tasks; namespace Lab192 { class Program { static void TaskAction() { Console.WriteLine("TaskAction started"); for (int i = 0; i < 5; i++) { Thread.Sleep(1000); Console.WriteLine($"Count: {i}"); } } public static void Main(string[] args) { Console.WriteLine("Main thread start!"); Task task = new Task(TaskAction); task.Start(); for (int i = 0; i < 20; i++) { Console.WriteLine("."); Thread.Sleep(500); } Console.WriteLine("Main thread stop!"); } } }