title: Cant split a line
body: <p>I have this part of code that takes a file and puts it in an <code>ArrayList</code>. The file that will be entered will be a <code>CSV</code> (the current <code>CSV</code> that I use has headers at the first line, so I don't need that line) and the second line has to be put in an <code>ArrayList</code>.</p>
  
  <p>I use <code>ArrayList</code> because the file can be dynamic, so I am not sure what will be the length of the second line. I tested (with a file that has 7 comma-separated values on the second line) this code and it prints that the <code>ArrayList</code> has a length (<code>fileList.Count</code>) = 1. </p>
  
  <p>What is wrong ?</p>
  
  <pre><code>ArrayList fileList2 = new ArrayList();
  private void button3_Click(object sender, EventArgs e)
  {
      string filename = "";
      DialogResult result = openFileDialog2.ShowDialog();
      if (result == DialogResult.OK)
      {
          filename = openFileDialog2.FileName;
          textBox3.Text = filename;
          string line2;
          System.IO.StreamReader file2 = new System.IO.StreamReader(textBox3.Text);  //reads file from textbox 
          stringforData = file2.ReadLine();      // this reads the first line that I dont need 
          while ((line2 = file2.ReadLine()) != null)     //read the lines 
          {
              // puts elements into array
              fileList2.Add(line2.Split(';'));//split the line and put it in the arraylist
          }
          file2.Close();
          if (true)    // this is for testind what is happening 
          {
              this.textBox2.Clear();
              textBox3.Text = Convert.ToString(fileList2.Count);
          }
      }
  }
  </code></pre>