Home > DeveloperSection > Articles > Multithreading


C# C# 
1 Comment(s)
 4584  View(s)
Rate this:

Multithreading with C#.Net

In C# multithreading is a way to implement multitasking.



            for (int i = 1; i <= 5; i++)


//creating thread for display() method

                Thread t = new Thread(new ThreadStart(display));

//starting thread.




  int i = 0;


        public void display()



//displaying messagebox.




Screen Shot

Here we can see that all five message boxes are displayed. But if we had not used threading then only one message box will be displayed and second box will be displayed only after clicking on OK button of first Message Box. All five message boxes are displayed simultaneously as different thread are created for display() method called from loop.

Nice article.

By marcel ethan on   3 years ago
Nice article.

Don't want to miss updates? Please click the below button!

Follow MindStick