using System.IO;
DirectoryInfo d = new DirectoryInfo(@"D:Test"); //Assuming Test is your Folder
FileInfo[] Files = d.GetFiles("*.txt"); //Getting Text files
string str = "";
foreach(FileInfo file in Files )
{
str = str + ", " + file.Name;
}
Hope this will help...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…