C#获取文件夹下的常用类型的所有图片,获取文件夹下多种类型的文件
代码如下:string[]imageFilePaths=Directory.GetFiles("C:\\Users\\jj\\Desktop\\bk_img")
.Where(s=>s.EndsWith(".png")||s.EndsWith(".jpg")||s.EndsWith(".jpeg")).ToArray();
2021-12-14 浏览(7595)
directory.getfiles获取多种格式文件
代码如下:string[]imageFilePaths=Directory.GetFiles("C:\\Users\\xx\\Desktop\\bk_img")
.Where(s=>s.EndsWith(".png")||s.EndsWith(".jpg")||s.EndsWith(".jpeg")).ToArray();
2021-12-14 浏览(8252)
