Skip to content

Instantly share code, notes, and snippets.

@hmcclungiii
Created November 27, 2018 17:16
Show Gist options
  • Save hmcclungiii/276c2314f3b4b5305e2214045638c7b1 to your computer and use it in GitHub Desktop.
Save hmcclungiii/276c2314f3b4b5305e2214045638c7b1 to your computer and use it in GitHub Desktop.
Filespec of file in the same directory as the current executable
private const string ConfigFile_Filename = "ENTER FILENAME HERE";
private string GetExePath()
{
return(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location));
}
private string GetFilespec()
{
return(System.IO.Path.Combine(GetExePath(), ConfigFile_Filename));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment