using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using ThreadLibrary;

namespace ThreadStarten
{
   public class Program
   {
      public static void Main(string[] args)
      {
         Tasks tsk = new Tasks();

         ThreadStart ts = new ThreadStart(tsk.Action1);
         ParameterizedThreadStart pts = new ParameterizedThreadStart(tsk.Action2);

         Thread t1 = new Thread(ts);
         Thread t2 = new Thread(pts);

         t1.Name = "Thread 1";
         t2.Name = "Thread 2";

         Console.WriteLine(t1.IsBackground.ToString());
         Console.WriteLine(t2.IsBackground.ToString());
         t2.IsBackground = true;

         t1.Start(); ;
         t2.Start("Hauptprogramm");
      }
   }
}
