title: How to read all CSV in a folder
body: <p>I have a little piece of code in which I can read a CSV file and then my code converts the accounts in the CSV file to IBAN accounts.</p>
  
  <p>Somehow this gives me an error:</p>
  
  <pre><code>using (var client = new WebService.BANBICSoapClient("IBANBICSoap"))
  {
      StreamReader sr = new StreamReader(@"C:\CSV\test.csv");
      StreamWriter sw = new StreamWriter(@"C:\CSV\testOut.csv");
      while (sr.Peek() &gt;= 0)
      {
          string line = sr.ReadLine();
          try
          {
              string[] rowsArray = line.Split(';');
              line = string.Empty;
              string account = rowsArray[0];
              string rel = rowsArray[1];
              string res = acc;
              string rest = acct;
              if (resultIBAN != string.Empty &amp;&amp; resultBIC != string.Empty)
              {
                  line = account + ";" + res +";" + rest + ";" + rel;
              }
  
              else
              {
                  line = account + ";" + "0" + ";" + "0" + ";" + rel;
              }
          }
          catch (Exception msg)
          {
              Console.WriteLine(msg);
          }
          sw.WriteLine(line) ;
      }
      sr.Close();
      sw.Close();
  }
  }
  </code></pre>