directory.getfiles获取多种格式文件
电脑版发表于:2021/12/14 17:26
代码如下:
string[] imageFilePaths = Directory.GetFiles("C:\\Users\\xx\\Desktop\\bk_img") .Where(s => s.EndsWith(".png") || s.EndsWith(".jpg") || s.EndsWith(".jpeg")).ToArray();
代码如下:
string[] imageFilePaths = Directory.GetFiles("C:\\Users\\xx\\Desktop\\bk_img") .Where(s => s.EndsWith(".png") || s.EndsWith(".jpg") || s.EndsWith(".jpeg")).ToArray();