Not with that sort of construct.
If you want to deal with 2 lines at a time then you need to do it slightly
differently, something like:
string _line1 = sr.ReadLine();
while (_line1 != null)
{
string _line2 = sr.ReadLine();
if (_line2 == null) break;
// you now have both lines in memory
// do some stuff with them
string _line1 = sr.ReadLine();
}
If you to deal with 1 line at a time but you need to reference something in
the subsequent line then you need to do it slightly differently again,
something like:
string _line1 = sr.ReadLine();
while (_line1 != null)
{
string _line2 = sr.ReadLine();
if (_line2 == null) break;
// you now have both lines in memory
// do some stuff with them
_line1 = _line2;
}
"PointMan" <so**********@gmail.comwrote in message
news:uM*************@TK2MSFTNGP04.phx.gbl...
what i know is...
while ((currentStr = sr.ReadLine()) != null)
{
in this area,
can i get next ReadLine Value of currentStr
}
best regard,,