How to get the current process in C#

1 Answer

0 votes
using System;
using System.Diagnostics;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            Process process = Process.GetCurrentProcess();

            Console.WriteLine(process);
        }
    }
}


/*
run:
 
System.Diagnostics.Process (ConsoleApplication_C_Sharp)
 
*/

 



answered Aug 11, 2018 by avibootz
edited Aug 11, 2018 by avibootz

Related questions

...