C# – How to get the name of the current executable in C#

ccommand line

I want to get the name of the currently running program, that is the executable name of the program. In C/C++ you get it from args[0].

Best Answer

System.AppDomain.CurrentDomain.FriendlyName