I need help in VB.NET on how to read the entile file line by line which has about 500 lines, and then search line by line if search match found and then display it
I have arrange them into an array but because the search need 2 matches on in each line then display it when each line meet those 2 matches
this code only display the first one found only and also not diplayin the entire lines
anyone can help me I appreacite it so much
thank you
this is my code so far
Dim fileContents() As String
fileContents = My.Computer.FileSystem.ReadAllText("C:\Documents and Settings\user0044\My Documents\WindowsApplication2\WindowsApplication2\bin\Debug\MyFile.txt").Split(vbCrLf)
For x As Integer = 0 To fileContents.Length - 1
If fileContents(x).Contains(ComboBox1.Text) Then
TextBox1.Text = fileContents(x).Substring(1, fileContents(x).IndexOf(" "))
End If
Next x
End Sub