title: string.Split() and an if statement
body: <p>I have a text file which I split with a <code>\n</code>.</p>
  
  <p>text file (test) reads </p>
  
  <pre><code>1
  2
  3
  4
  </code></pre>
  
  <p>now the confusing part. </p>
  
  <p>code</p>
  
  <pre><code>string test = System.IO.File.ReadAllText(@"C:\Custom tests\"+testselect.Text+".txt");
  
  string[] check = test.Split('\n');
  
  if (check[0] == "1")
  {
       label.Text = "whatever";
  }
  </code></pre>
  
  <p>this does not work. The label stays default value. however if I :</p>
  
  <pre><code>label.Text = check[0];
  </code></pre>
  
  <p>the label displays a 1.</p>
  
  <p>I do not understand this please help.</p>