StreamReader reader = new StreamReader(stream);
string line = "";
//loop through file
while ((line = reader.ReadLine()) != null)
{
Regex dateMatcher = new Regex("\\d");
//if we found a date
if (dateMatcher.Match(line, 0, 1).Success)
{
//store it
time = ParseDate(line);
}
//look for @, take next two lines
//if no @ is found before next date, reset time and try again
Regex statMatcher = new Regex("@");
//if we found a date
if (statMatcher.Match(line, 0, 1).Success)
{
//this line right heah is an issue
string line2 = reader.ReadLine();
LBStatsData res = ParseData(line, line2);
res.Date = time;
stats.Add(res);
}
}
below the comment "this line right heah is an issue" I thought that ReadLine() would read the NEXT line from the stream, but it seems to be getting the current one, can anyone tell me what I'm doing wrong? I need to get that next line right there in the code...

New Topic/Question
Reply




MultiQuote






|