C# 删除目录下所有文件

System.IO.DirectoryInfo dir = new DirectoryInfo("D:\\temp");
foreach (System.IO.FileInfo file in dir.GetFiles())
        file.Delete();