Answers for "how to get the current folder path in c#"

C#
15

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
1

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
1

c# get folder path from file path

Path.GetDirectoryName(filename);
Posted by: Guest on June-02-2021

Code answers related to "how to get the current folder path in c#"

C# Answers by Framework

Browse Popular Code Answers by Language