May 3rd, 2013, 07:48 AM
Problem in creating Threads
I am trying to create and test a Thread ..
Using a code from tutorial ..
static void Main(string args)
Thread t = new Thread(WriteY); // create thread
t.Start(); // start thread
for (int i = 0; i < 500; i++) Console.Write('S');
for (; ; )
// Infinite loop to check thread occurance
static void WriteY()
Console.WriteLine(" YYYYYYYY ");
I need continuously running thread till my application Runs.
This is just a test program.
But the thread t is not continuous. It stops after 1/2 r occurances.
I am using visual C# express 2010 and unable to use Resume .
Pl guide me , where is the problem. ?
Thanking you ..
Last edited by Arjay; May 3rd, 2013 at 11:59 AM.
Reason: Added code tags
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.