title: How to read each line in a file which is delimited by LF only?
body: <p>I have to read line-by-line a log file. It's about 6MB in size and 40000 line total. But after testing my program, I discover that that log file is only delimited by LF character only. So I can't use the <code>Readline</code> method of <code>StreamReader</code> class</p>
  
  <p>How can I fix this problem?</p>
  
  <p>edit: I tried to use Text Reader, but my program still didn't work:</p>
  
  <pre><code>using (TextReader sr = new StreamReader(strPath, Encoding.Unicode))
              {
  
  
                  sr.ReadLine(); //ignore three first lines of log file
                  sr.ReadLine(); 
                  sr.ReadLine();
  
                  int count = 0; //number of read line
                  string strLine;
                  while (sr.Peek()!=0)
                  {
                      strLine = sr.ReadLine();
                      if (strLine.Trim() != "")
                      {
                          InsertData(strLine);
                          count++;
                      }
                  }
  
                  return count;
              }
  </code></pre>