MultiThreading

Introduction This article is about muilti – threading concept in .NET explained using C# as programming language. Multi threading is an important aspect that needs a special attention while building very huge system, especially when there is a trade off between efficiency (how fast the …

Lets start with a simple application. Have a look at the code below: class BankAccount { public int Money; } class Program { static void Main (string[] args) { BankAccount account = new BankAccount(); account.Money = 100; Thread oneDollarThread = new Thread(new ParameterizedThreadStart(AddOneDollar)); Thread twoDollarThread …

The Thread Class: Once you’ve decided what work needs to be done in a separate thread by your application, you need to create an object of the Thread class. The Thread class is used for creating threads, controlling them, and for terminating them. I’ll show …