From the course: LINQPad Essential Training

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Repeat table headers

Repeat table headers

- [Instructor] This is one of my favorite demos I like to show when I'm showing the power of Link, which is how you can work with any method that returns a array or a list. And so what we have here is the Process class has a method called GetProcesses which returns an array of all the running processes on this computer. What I'm doing on the next line is declaring a variable in the Link Query called ThreadCount that has the number of threads in that process. And then I order them by thread count descending and then I select that ProcessName and ThreadCount. And you can see here, when I run the query, I end up with 262 items and I can see that these are the items, these are the processes, I should say, that have the most threads, at the top of this list. Now, the problem with any table, when you scroll down the table you start losing track of what the name of the column is and you have to scroll back to the top. So…

Contents