How do I get the name of the current executable in C#?

Joakim picture Joakim · Mar 5, 2009 · Viewed 284.2k times · Source

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].

Answer

Steven A. Lowe picture Steven A. Lowe · Mar 5, 2009
System.AppDomain.CurrentDomain.FriendlyName