Solved

Process Id

Posted on 2009-05-12
3
178 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now