title: What is the difference between :End of file (EOF) ,End of stream ,and string !=NULL in C#
body: <p>what is the difference  between  using 
  <code>StreamReader.EndOfStream</code>, and  <code>string != null</code>  in files handling  </p>
  
  <pre><code>using (StreamReader sr = new StreamReader("TestFile.txt"))
  {
  String line;
  while ((line = sr.ReadLine()) != null)
  {
  Console.WriteLine(line);
  }
  }
  
  
  
  
  
  
   while (!reader.EndOfStream)
              {
                  data = BreakLine(line);
                  DataRow dr = _DataTable.NewRow();
                  // protect against overflow
                  int maxColumns = Math.Min(_DataTable.Columns.Count, data.Length);
                  for (int i = 0; i &lt; maxColumns; i++)
                  {
                      dr[i] = data[i];
                  }
                  _DataTable.Rows.Add(dr);
                  line = reader.ReadLine();
              }
  </code></pre>