多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` String path = @"X:\xxx\xxx"; //第一种方法 string[] files = Directory.GetFiles(path, "*.txt"); foreach (string file in files) { Console.WriteLine(file); } //第二种方法 DirectoryInfo folder = new DirectoryInfo(path); foreach (FileInfo file in folder.GetFiles("*.txt")) { Console.WriteLine(file.FullName); } ```