I have created thread as
Thread th = new Thread(DoSomething);
th.IsBackground = true;
but at the same time main thread
"Not working" means: it won't compile. That's correct.—SA
System.Threading.Thread.Sleep is static. You don't need a thread reference to indicate what thread should be effected: the thread to be put to sleep is the current thread. In this way, a code thread can put to sleep only the same thread running this code. This is a common paradigm of all threaded systems.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)