What's the simplest way to obtain the current process ID from within your own application, using the .NET Framework?
Get a reference to the current process and use System.Diagnostics's Process.Id property:
System.Diagnostics
Process.Id
int nProcessID = Process.GetCurrentProcess().Id;
1.4m articles
1.4m replys
5 comments
57.0k users