I have 54,000 files each with a slightly different method of naming and I need to check whether the filename contains a particular string. However, I can't find a ways of getting a Select statement to work correctly.
My code fails unexpectedly. Please can anyone tell me why the string "BAR" is not found in "BARITONE"?
Dim tempCheck as string = "1st BARITONE" Dim GoodOne as Boolean = False Select Case tempCheck Case tempCheck.Contains("CORN") GoodOne = True Case tempCheck.Contains("HORN") GoodOne = True Case tempCheck.Contains("BAR") GoodOne = True Case tempCheck.Contains("TROM") GoodOne = True Case tempCheck.Contains("EUP") GoodOne = True Case Else GoodOne = False End Select
things.Any(i => stuff.Contains(i))(C#, but still).