문제

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:

int nProcessID = Process.GetCurrentProcess().Id;

다른 팁

Process.GetCurrentProcess().Id
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top