string line; StreamReader sr = new StreamReader("some file"); while(line = sr.ReadLine() != null) { // do something with line }
string line; StreamReader sr = new StreamReader("some file"); line = sr.ReadLine(); while(line != null) { // do something with line line = sr.ReadLine(); }
while( (line = sr.ReadLine()) != null)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)