|
using System;
using System.Threading;
public class MyThread {
public void Thread1() {
Console.WriteLine(Thread.GetDomain() );
for (int i = 0; i < 10; i++) {
Thread thr = Thread.CurrentThread;
Console.WriteLine(i);
}
}
}
public class MyClass {
public static void Main() {
Console.WriteLine("Before start thread");
MyThread thr1 = new MyThread();
Thread tid1 = new Thread(new ThreadStart(thr1.Thread1) );
tid1.Start();
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.