StreamReader sw = new StreamReader(fs);
while (sw.EndOfStream != true)
{
yazi += sw.ReadLine();
}
StreamReader.EndOfStream This is the most correct usage. Because when the lines are finished reading it returns true. At the beginning it returns false