0

I have a list -> 12,15,16,19,10,11,13 various text in this list (2000+) now i want to find it my.txt file in this list using one cmd without loop or for each..anyone have solution this?

Sample code -

dim x as string = io.file.readalltext("myfile.txt")

Button 1 click...

Dim result as string = x.index of (item1,item2)
Mary
  • 14,926
  • 3
  • 18
  • 27
Alex
  • 1
  • 4
  • 1
    It's probably difficult to understand what objects you're managing. Could you post a sample of your code and the input? Maybe also something you have already tried to solve the problem. – Jimi Jul 07 '19 at 17:23
  • 1
    Question unclear, please paraphrase. – CruleD Jul 07 '19 at 17:26
  • 3
    Possible duplicate of [How to find list of string using vb.net](https://stackoverflow.com/questions/56891939/how-to-find-list-of-string-using-vb-net) – Andrew Morton Jul 07 '19 at 17:27
  • dim x as string=io.file.readalltext("myfile.txt") - dim result as string = x.index of("12,123,12345") – Alex Jul 07 '19 at 18:06
  • 1
    You could do this with one line of code with Linq but, guess what, there is a loop behind the scenes with the Linq. – Mary Jul 07 '19 at 19:11

0 Answers0