get files in directories c# code example
Example 1: c# get files of type in directory
string[] files = System.IO.Directory.EnumerateFiles(directory, "*.*").ToArray();
Example 2: get folders in directory c#
string[] folders = System.IO.Directory.GetDirectories(@"C:\My Sample Path\","*", System.IO.SearchOption.AllDirectories);