I am using following code to read text from a .txt file. But I don’t know how to
perform search within file and how to read a specific line in the text file, based on search.
Dim vrDisplay = My.Computer.FileSystem.ReadAllText(CurDir() & "\keys.txt")
MsgBox(vrDisplay)
For an example,
if I want to read the line that contains the word “Start”, how to do that
Thanks.
Instead of reading all text, for efficiency’s sake,
Edit: even if it’s required that you keep the entire file in memory, you can still do the above by using a
MemoryStream().