I have a combo box called comboFileTypes. Inside that is a drop down list containing:
MP4
MOV
MKV
VOB
And after a button press I have the following code to scan a directory for files:
var files = Directory
.EnumerateFiles(sourceDIR.Text, "*.*", SearchOption.AllDirectories)
.Where(s =>
s.EndsWith(".mp4") ||
s.EndsWith(".mov") ||
s.EndsWith(".vob") ||
s.EndsWith(".MP4") ||
s.EndsWith(".MOV") ||
s.EndsWith(".VOB"));
Which is hardcoded. I want the WHERE option to be dynamically generated from the combobox instead, so that the user can add another type of file if they need to. (Also case insensitive, if that's possible, otherwise I'll just add both cases)
Any help would be appreciated.