Click here to Skip to main content
15,915,800 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please give me some samples for calling innumerous Multiple threads in C# code of Console application.

Thanks,
Senthil
Posted

First of all, do not simply demand code, that's not what the Q&A forum is intended for...

Anyway, .NET offers several classes and mechanisms to create and use multiple threads and you can find lots of examples at MSDN. You have to choose which class fits your needs...

For example: Task Parallel library, BackgroundWorker class, Thread class, ThreadPool class...
 
Share this answer
 
firstly make threads.
ThreadStart t1=new ThreadStart(Threadname1);
ThreadStart t2=new ThreadStart(Threadname2);
ThreadStart t3=new ThreadStart(Threadname3);
Thread th1=new Thread(t1);
Thread th2=new Thread(t2);
Thread th3=new Thread(t3;
th1.Priority=ThreadPriority.High;
th2.Priority=ThreadPriority.;
th3.Priority=ThreadPriority.normal;
th1.Start();
th2.Start();
th3.Start();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900