No. There are no cases to put in select case statement. And big number of file extensions (40-45?) is not a big factor of performance at all compared to the total number of files found assuming this number is considerable.
This number of different file extension is not so big to be relevant to performance at all; the only real factor is a total number of file names found. Let's say, you will make a double loop: outer loop will run through a set of extensions you need (for example, an array of strings each representing a file mask) and call to
System.IO.DirectoryGetFiles(String, String, SearchOption)
, and internal loop will run through all the files found for each file mask. See
http://msdn.microsoft.com/en-us/library/system.io.directory.aspx[
^].
Don't forget, there is a caveat in using a file mask. It is described with the solution here:
Directory.Get.Files search pattern problem[
^].
—SA