Multiple Threads
how do i create two threads running at the same time simultaneously?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 15, 2013, 10:15 AM
// in some method
Thread t1 = new Thread(ThreadMethod1);
Thread t2 = new Thread(ThreadMethod2);
t1.Start();
t2.Start();
// add method for first thread
private void ThreadMethod1()
{
// do some stuff in here
}
// add method for second thread
private void ThreadMethod2()
{
// do some other stuff in here
}
Raps GaoPosted Apr 15, 2013, 10:21 AM