Answers for "c# get directoryname"

C#
2

get directory name of path c#

string filename = @"C:/folder1/folder2/file.txt";
string FolderName = new DirectoryInfo(System.IO.Path.GetDirectoryName(filename)).Name;
Posted by: Guest on January-01-2021
1

c# get directory name from filename

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

C# Answers by Framework

Browse Popular Code Answers by Language