C# – Get FileName of Current Executable
by admin on Feb.29, 2012, under Programming
This is how to get the filename of your executable-file in C-Sharp:
System.AppDomain.CurrentDomain.FriendlyName
It’s a String and you can print it like this:
Console.WriteLine(System.AppDomain.CurrentDomain.FriendlyName);