| Below is the simplest code to get the processid and its information
System.Diagnostics.Process CurrentProcessid = new System.Diagnostics.Process();
CurrentProcessid = System.Diagnostics.Process.GetCurrentProcess();
MessageBox.Show(CurrentProcessid.Id.ToString());
| | |