Hello,

When using VB, I use this code to get the name of all processes currently running;
VB Code:
  1. Dim pro As Variant
  2.  
  3. For Each pro In GetObject("winmgmts:").ExecQuery("Select * from win32_process")
  4.     Debug.Print pro.Name
  5. Next
How can I accomplish the same thing in C#?

Thank you.