Developer, Former MVP, now at Microsoft - Best of 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
static void Main(string[] args) { var results = from p in Process.GetProcesses() select p; // foreach (var o in results) { Console.WriteLine(o.ToString()); }// Console.ReadLine(); }
from p in Process.GetProcesses() where p.Threads.Count > 6 select p;
from p in Process.GetProcesses() where p.Threads.Count > 6 orderby p.ProcessName descending select p;
from p in Process.GetProcesses() where p.Threads.Count > 6 orderby p.ProcessName descending select new {p.ProcessName, ThreadCount = p.Threads.Count, p.Id };
Sub Main() Dim results = _ From p In Process.GetProcesses() _ Where p.Threads.Count > 6 _ Order By p.ProcessName Descending _ Select New With {p.ProcessName, .ThreadCount = p.Threads.Count, p.Id}' For Each o In results Console.WriteLine(o.ToString()) Next' Console.ReadLine() End Sub