Ejemplo n.º 1
0
        public static void Do()
        {
            // Start a thread that calls a parameterized static method.
            var newThread = new Thread(DoWorkWithData);

            newThread.Start(42);

            // Start a thread that calls a parameterized instance method.
            var w = new Work1();

            newThread = new Thread(w.DoMoreWork);
            newThread.Start("42");
        }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     Work1.Do();
     Work2.Do();
     Console.ReadKey();
 }