title: Best way to remove the last character from a string built with stringbuilder
body: <p>I have the following</p>
  <pre><code>data.AppendFormat(&quot;{0},&quot;,dataToAppend);
  </code></pre>
  <p>The problem with this is that I am using it in a loop and there will be a trailing comma. What is the best way to remove the trailing comma?</p>
  <p>Do I have to change data to a string and then substring it?</p>