Header Ads

Header Ads

get all the running processes information using C#

get all the running processes information using C#

friends today i tell you how to get running process information using c#
Code
first you include in using System.Diagonistics Namespace
Coding
class processinfo
{
         public static void Main(string[]args)
           {

                    process [] p=process. get-processes(".");
                    foreach(process pr in p)
                       { 
                         Console.WriteLine("Process id {0} \t Process name {1}",pr.Id,pr.Processname)
                        }

            }

}

this code is very useful for get the information of current processes.

No comments:

Powered by Blogger.