Answers for "get directory name from a path"

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

Code answers related to "get directory name from a path"

C# Answers by Framework

Browse Popular Code Answers by Language