title: C# Detecting null characters in a string array
body: <p>I am reading in from a text file using <code>StreamReader</code> into a string array <code>text[]</code>. One of the lines in the textfile is being read in as <code>"\0"</code> in positions 1 -> 20 of the array. How would I go about detecting this null character and ignoring this line.</p>
  
  <p>Code example:</p>
  
  <pre><code>StreamReader sr = new StreamReader(Convert.ToString(openFileDialog1.FileName));
  while (!sr.EndOfStream)
  {
      string l= sr.ReadLine();
      string[] parsedLine = l.Split(new char[] { '=' },StringSplitOptions.RemoveEmptyEntries);
      // Not working:
      if (parsedLine.Length == 0)
      {
          MessageBox.Show("Ignoring line");
      }
  </code></pre>
  
  <p>Any help would be great!</p>