C # process gets information about current processes

Source: Internet
Author: User

1. Get the current process information organized

Process.getcurrentprocess () that returns the process object for the current program.

Process cur =process.getcurrentprocess (); //ID of the current processConsole.WriteLine (cur.    ID); //gets the Terminal Services session identifier of the associated process. Console.WriteLine (cur.    SESSIONID); //the name of the current processConsole.WriteLine (cur.    ProcessName); //the start time of the current processConsole.WriteLine (cur.    StartTime); //gets the value specified when the associated process terminates, used in the Exit event//Console.WriteLine (cur.    ExitCode); //gets the current machine name of the processConsole.WriteLine (cur. MachineName);//. Represents a local//Gets the main window caption for the process. Console.WriteLine (cur. MainWindowTitle);

More:

C # Process Launch instance

C # Processes and threads

C # Processes and threads

C # process gets information about current processes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.