Consider the below program
myThread = new Thread(
new ThreadStart(
delegate
{
Method1();
Method2();
}
)
);
Is it that 2 threads are getting called parallely(multitasking) or a single thread is calling the methods sequentially?
That’s a single thread.
Method2()won’t be called beforeMethod1()ends.If you want
Method1()andMethod2()to be each in a separate thread you can do:and start them:
now both can be running concurrently.
Useful resources: