using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
string[] files;
files =Directory.GetFiles("E:/pics/birthday-2014/");
Console.WriteLine("File Names:");
for (int i = 0; i < files.Length; i++)
{
Console.WriteLine("\t"+files[i]);
}
}
}
}
Program
Output
Note: In above program, we need to remember, when we use "Directory" class, System.IO namespace must be included in the program.