Exemplo n.º 1
0
 static void Main(string[] args)
 {
     Taks task = new Taks(10000);
     Thread t = new Thread(task.DoWork);
     t.Start();
     while (t.IsAlive)
     {
         Console.Write(".");
         Thread.Sleep(1000);
     }
     Console.WriteLine("Sum: " + task.Sum);
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Taks   task = new Taks(10000);
            Thread t    = new Thread(task.DoWork);

            t.Start();
            while (t.IsAlive)
            {
                Console.Write(".");
                Thread.Sleep(1000);
            }
            Console.WriteLine("Sum: " + task.Sum);
        }