Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Process Id

How do I get the process id from inside of the process in C#?
0
mdoland
Asked:
mdoland
  • 2
1 Solution
 
ViceroyFizzlebottomCommented:
Process p = Process.GetCurrentProcess();

0
 
ViceroyFizzlebottomCommented:
Whoops, to answer fully,

int procId = p.Id;
0
 
mdolandAuthor Commented:
Perfect, thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now