标签:message sse each main pdo process sage ntp current
如果获得当前进程的Id用:
Process[] processes = Process.GetProcesses();
foreach(Process process in processes)
{
if(process.ProcessName == "进程名"
{
MessageBox.Show(process.Id);
}
}
Process processes =Process.GetCurrentProcess
processes.id获得当前进程的ID
如果获得当前线程的ID用:
Thread.CurrentThread.ManagedThreadId.ToString() (推荐)
或
AppDomain.GetCurrentThreadId().ToString()
标签:message sse each main pdo process sage ntp current
原文地址:http://www.cnblogs.com/comsky/p/6020327.html