Answers for "c# get folder names in path"

C#
1

get folders in directory c#

string[] folders = System.IO.Directory.GetDirectories(@"C:My Sample Path","*", System.IO.SearchOption.AllDirectories);
Posted by: Guest on October-30-2020
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
0

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