47 lines
760 B
C#
47 lines
760 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ConsoleAppTasks
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
var t = new Task(DoIt);
|
|
|
|
t.Start();
|
|
|
|
for (int i = 0; i < 999; i++)
|
|
{
|
|
Console.WriteLine("-");
|
|
Thread.Sleep(200);
|
|
}
|
|
|
|
|
|
|
|
Console.ReadLine(); //wait for close
|
|
|
|
}
|
|
|
|
|
|
private static void DoIt()
|
|
{
|
|
Console.WriteLine(".");
|
|
|
|
for (int i = 0; i < 999; i++)
|
|
{
|
|
Console.WriteLine("+");
|
|
Thread.Sleep(500);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|