2 using System.Threading;
8 static bool tfailed = true;
10 static void thread () {
14 Console.WriteLine ("start value: {0}", var);
15 for (int i = 0; i < 10; ++i) {
19 Console.WriteLine ("end value: {0}", var);
27 Thread thr = new Thread (new ThreadStart (thread));
32 Console.WriteLine ("value in main thread: {0}", var);
34 Console.WriteLine ("value in main thread after join: {0}", var);