title: out of bounds error c#
body: <p>Im trying to read contents of a csv file into different variables in order to send to a web service.It has been working fine but suddenly today i got and exception.</p>
  
  <p>index was outside the bounds of the array:</p>
  
  <p>what Did I do wrong?</p>
  
  <pre><code>String sourceDir = @"\\198.0.0.4\e$\Globus\LIVE\bnk.run\URA.BP\WEBOUT\";
  // Process the list of files found in the directory. 
  string[] fileEntries = Directory.GetFiles(sourceDir);
  foreach (string fileName2 in fileEntries)
  {
      // read values
      StreamReader st = new StreamReader(fileName2);
      while (st.Peek() &gt;= 0)
      {
          String report1 = st.ReadLine();
          String[] columns = report1.Split(','); //split columns 
          String prnout = columns[0];
          String tinout = columns[1];
          String amtout = columns[2];
          String valdate = columns[3];
          String paydate = columns[4];
          String status = columns[5];
          String branch = columns[6];
          String reference = columns[7];
      }
  }
  </code></pre>