title: Trim last "," delimiter of a string in VB.NET
body: <p>This is my code:</p>
  
  <pre><code>With ad.Tables(2)
      For i As Integer = 0 To .Rows.Count - 1
          If .Rows(i)("name") &amp; "" &lt;&gt; "" Then
              temp &amp;= .Rows(i)("name") &amp; ", "
          End If
      Next
  End With
  temp = temp.Trim(",")
  testing &amp;= "&amp;Name=" &amp; temp &amp; vbCrLf
  </code></pre>
  
  <p>With this is get a comma in the end of the string. But if I do</p>
  
  <pre><code>temp = temp.Trim.Trim(",")
  </code></pre>
  
  <p>all commas are deleted.</p>
  
  <p>How do I keep all commas and only delete the last one?</p>