As far as I can tell, this method is returning a blank line every other line, but I can't figure out why:
public static List<string> plain(string path, int num)
{
List<string> result = new List<string>();
StreamReader reader = File.OpenText(path);
string line;
int i = 0;
while ((line = reader.ReadLine()) != null)
{
result.Add(line);
i++;
if (i == num) { break; }
}
return result;
}
Does anyone have an idea? I'm sure it's something simple I'm overlooking :).