Answers for "get directory name of path c#"

C#
0

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 of path c#"

C# Answers by Framework

Browse Popular Code Answers by Language