public static bool IsFileOneOf(string forFile, IEnumerable<string> filetypes) { return filetypes.Any(ext => forFile.EndsWith(ext)); }