Skip to main content

Posts

Showing posts from 2019

Working with Threads

A thread controls the flow of an executable program. By default, a program has one thread called Main Thread . Main Thread starts when control enters in the Main method and it terminates when Main method returns. If the execution of a program is controlled by more than one thread, it’s called a Multithreaded Application . Such a program increases the performance and response time of an application. In C#, the System.Threading namespace is used for creating and managing thread(s) in a multithreaded application. A thread can be created by using System.Threading.Thread class. A thread can only be manipulated on a method. For example, MainThread needs a Main method to control the flow of a progam. In a C# progarm, a thread can be found in any of the following states: States of a Thread System.Threading.Thread class contains the following common methods and properties, which are helpful for managing a thread. Common Methods and Properties of Thread Class

C#

C# is the most commonly used language for leveraging the .NET Framework. As such, learning C# is a springboard to creating enterprise systems, desktop applications, websites and  mobile applications.