Answers for "c# executing assembly path"

C#
0

c# executing assembly path

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);
    }
}
Posted by: Guest on September-21-2021

C# Answers by Framework

Browse Popular Code Answers by Language