Path to the executable

Here’s the easiest copy and paste for getting the path to your executable. This works great for regular executables

using System.Reflection;
using System.IO;
private string ExecutablePath
{
get
{
return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
}
}