Hello, I have been using
TextBox1.Text = File.ReadAllLines("MyText.txt").FirstOrDefault(Function(x) x.Contains("user"))
Using reader As New StreamReader("Test.txt") While Not reader.EndOfStream Dim line As String = reader.ReadLine() If line.Contains("user") Then TextBox1.Text = line Exit While End If End While End Using
to find the first instance of the word “user” and placing it in textbox1. Now I need to make it so it will put all the lines with the word “user” in textbox1 since I now need to see all the users not just the first user in the text file. Can anyone guide me on modifying the code to put all the lines that contain the word “user” in textbox1?