Answers for "c# get root folder of current directory"

C#
2

get working directory c#

var DDIR = System.IO.Directory.GetCurrentDirectory();
var WorkingDirectory = "";
int index = DDIR.IndexOf(@"");
if (index > 0)
	WorkingDirectory = DDIR.Substring(0, index) + @"";
Posted by: Guest on September-15-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

Code answers related to "c# get root folder of current directory"

C# Answers by Framework

Browse Popular Code Answers by Language