Question Detect specific word in text file

villy

Member
Joined
Feb 11, 2009
Messages
10
Programming Experience
Beginner
Hi all,
I have a function read the text file line by line, i have to detect a specific word in the text file befere proceed to another action. But I can't use substring because i not sure exact location of the word. any idea? Thanks experts.. :)
 
Last edited:
When you call ReadLine it returns a String. The String class has an IndexOf method that will return the index of a substring or -1 if the substring is not found. If you don't care about the actual index then the Contains method will just return True or False.
 
Back
Top