.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> System Process >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Getting Information of Current Running Process

Posted By:Hefin Dsouza       Posted Date: April 29, 2009    Points: 10    Category: System Process    URL: http://www.dotnetspark.com  

There may me a need for you to get information of the Current Running Process.The Code Below will allow you to display Information about the Current Process.

public void GetCurrentProcessesDetails()
      Process currentProcess = Process.GetCurrentProcess();
      Console.WriteLine("Current Process is:- " +currentProcess.ProcessName);
"Current Process ID is:- " + currentProcess.Id);
"Total Process Time:- " + currentProcess.TotalProcessorTime);

Regards Hefin Dsouza
[Software Freelancer and Trainner]


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend