using System;
using System.IO;
namespace DirectoryIoExample
{
class Program
{
static void Main(string[] args)
{
DirectoryInfo di = new DirectoryInfo(@"c:\");
foreach(var fi in di.GetFiles())
Console.WriteLine(fi.Name);
foreach(var fi in Directory.GetFiles(@"c:\"))
Console.WriteLine(fi);
}
}
}