判断D盘下是否存在txt类型的文件
string p_Path="D:\\"; bool IsHaveTxt() { DirectoryInfo foldinfo = new DirectoryInfo(p_Path); foreach (FileInfo info in foldinfo.GetFiles("*.txt")) { return true; } return false; }
判断D盘下是否存在txt类型的文件
string p_Path="D:\\"; bool IsHaveTxt() { DirectoryInfo foldinfo = new DirectoryInfo(p_Path); foreach (FileInfo info in foldinfo.GetFiles("*.txt")) { return true; } return false; }