Query processes using LINQ to find windows services

IEnumerable<Process> pList = from proc in Process.GetProcesses()
					   where String.Equals(proc.ProcessName, "svchost")
					   select proc;

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.