T
Tony Johansson
Hello!
Here I have a simple example to start a Thread. I have noticed that I can
skip the Threadstart and pass the working method directly to the Thread
C-tor.
So what is the point to use ThreadStart when it works just as good without
it.
public static void MyMethod()
{
Console.WriteLine("Testing thread");
}
static void Main(string[] args)
{
Thread myThread = new Thread (MyMethod);
myThread.Start();
}
//Tony
Here I have a simple example to start a Thread. I have noticed that I can
skip the Threadstart and pass the working method directly to the Thread
C-tor.
So what is the point to use ThreadStart when it works just as good without
it.
public static void MyMethod()
{
Console.WriteLine("Testing thread");
}
static void Main(string[] args)
{
Thread myThread = new Thread (MyMethod);
myThread.Start();
}
//Tony