G
Guest
I have a text file which contains many words separated by lines, one per line. Is there anyway I could get read each line of text until the line of text matches my string in my application? Something along the lines of this
private void button1_Click(object sender, System.EventArgs e
string words
string searchforme = "look"
System.IO.TextReader tr = System.IO.File.OpenRead("C:\\words.txt")
d
words = tr.ReadLine()
while(words == searchforme = false)
if(words = searchforme
MessageBox.Show("Found a match")
els
MessageBox.Show("No match found")
}
private void button1_Click(object sender, System.EventArgs e
string words
string searchforme = "look"
System.IO.TextReader tr = System.IO.File.OpenRead("C:\\words.txt")
d
words = tr.ReadLine()
while(words == searchforme = false)
if(words = searchforme
MessageBox.Show("Found a match")
els
MessageBox.Show("No match found")
}