Created
September 22, 2015 17:37
-
-
Save robertstefan/2de9b97c01a4189cf523 to your computer and use it in GitHub Desktop.
Get current running folder path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string AssemblyDirectory | |
{ | |
get | |
{ | |
string codeBase = Assembly.GetExecutingAssembly().CodeBase; | |
UriBuilder uri = new UriBuilder(codeBase); | |
string path = Uri.UnescapeDataString(uri.Path); | |
return Path.GetDirectoryName(path); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment