private void CheckImage(string path) { MyService.Services ss = new MyService.Services(); DirectoryInfo info = new DirectoryInfo(path);
foreach (var item in info.GetDirectories()) { string name = item.Name; foreach (var items in item.GetFiles()) { //name = info.Name; string extension = items.Extension.ToLower(); string[] imgExtension = new string[] { ".jpg", ".gif", ".png", ".bmp", ".jpeg" }; bool isPic = false; foreach (string itemf in imgExtension) { if (itemf == extension) { isPic = true; } } }
} }
转载于:https://www.cnblogs.com/wanheng/archive/2012/01/11/2319218.html
