Answers for "get current root directory c#"

C#
11

c# get current directory

string currentDir = System.IO.Directory.GetCurrentDirectory();
//returns the current directory of the application when executing
Posted by: Guest on December-11-2020
6

get current directory c#

System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
Posted by: Guest on August-17-2020
0

c# get application root path directory

public static string GetApplicationRoot()
        {
            var exePath = new Uri(System.Reflection.
            Assembly.GetExecutingAssembly().CodeBase).LocalPath;
            return new FileInfo(exePath).DirectoryName;

        }
Posted by: Guest on January-05-2022

C# Answers by Framework

Browse Popular Code Answers by Language