title: Append data to a .csv File using C#
body: <p>The following code writes the data and is working fine, but I want to add more than one client (maybe 10) in the .csv file. How can I achieve this. Thanks in advance.  </p>
  
  <pre><code>private void createFileButton_Click(object sender, EventArgs e)
  {
      string newFileName = "C:\\client_20100913.csv";
  
      string clientDetails = clientNameTextBox.Text + "," + mIDTextBox.Text + "," + billToTextBox.Text;
  
      //Header of the .csv File
      string clientHeader = "Client Name(ie. Billto_desc)" + "," + "Mid_id,billing number(ie billto_id)" + "," + "business unit id" + Environment.NewLine;
  
      File.WriteAllText(newFileName, clientHeader);
      File.AppendAllText(newFileName, clientDetails);
  
      MessageBox.Show("Client Added", "Added", MessageBoxButtons.OK); 
  }
  </code></pre>