Solved

Process Id

Posted on 2009-05-12
3
187 Views
Last Modified: 2012-05-06
How do I get the process id from inside of the process in C#?
0
Comment
Question by:mdoland
  • 2
3 Comments
 
LVL 6

Expert Comment

by:ViceroyFizzlebottom
ID: 24364886
Process p = Process.GetCurrentProcess();

0
 
LVL 6

Accepted Solution

by:
ViceroyFizzlebottom earned 125 total points
ID: 24364923
Whoops, to answer fully,

int procId = p.Id;
0
 

Author Closing Comment

by:mdoland
ID: 31580537
Perfect, thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question