Hi ,
I am trying to create and test a Thread ..
Using a code from tutorial ..
Code:
namespace ThreadTry
{
class Program
{
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 (; ; )
{
Console.Write('M');
// 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 ..