What is the use of threadstart class and thread class in c#.net?
Multi Threading
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.
Sachin SinghPosted Jan 29, 2021, 7:10 PM
Aman GuptaPosted Jan 29, 2021, 6:40 PM
Thread(ThreadStart) Constructor is used to initialize a new instance of a Thread class. This constructor will give ArgumentNullException if the value of the parameter is null.
Syntax:
public Thread(ThreadStart start);Here, ThreadStart is a delegate that represents a method to be invoked when this thread begins executing.
In C#, a multi-threading system is built upon the Thread class, which encapsulates the execution of threads. This class contains several methods and properties which helps in managing and creating threads and this class is defined under
System.Threadingnamespace.Characteristics of Thread class:
Kiran MohantyPosted Jan 29, 2021, 3:15 PM