![]() If we create any other threads in our program by using Thread class those will become child threads for the Main thread. Generally, in c# when we start a program execution, the Main thread will automatically create to handle the program logic. Once we import System.Threading namespace, we can create or access the threads using Thread class. In c#, we need to import System.Threading namespace in our program to work with threads. So, we can say that every program or application is by default a single-threaded model.įor example, in a Windows operating system, if we open Microsoft Excel and Word applications simultaneously, then each application process will be taken care by separate threads. ![]() In c#, the thread is a basic unit of execution within the process, and it is responsible for executing the application logic.īy default, every application or program will carry one thread to execute the application logic, and that thread is called the Main thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |