Duration: 20 minutes
Summary: In this video, we will discuss the concepts of processes and threads. Using the GetProcesses static method in the Process class, we can get all the current processes through a linq query. Then we can loop over the list and print the process id and name. We can also get a process through an id, and retrieve all the threads in that process. We will also see how to get the process modules and print their information on the screen. Finally, we will see how to start a process using the Process.Start() method. In our example, we start the internet explorer process.
Technology Used: C# 4.0 – Core Concepts
Keywords: C#, System, Process, Thread, Console, var, foreach, ProcessThreadCollection, ProcessThread, Process, OrderBy, Select, ProcessStartInfo, ProcessWindowStyle, InvalidOperationException.