Aggregate Extension method and Final Character removal
<p>I have a list of ints.  When this list is </p>

<p><code>1,2,3</code> </p>

<p>I wanted to create a string </p>

<p><code>'1|2|3'</code>.  </p>

<p>So, I did this</p>

<pre><code>string valueIds = selectedAttributeValueIds.Aggregate("'", (current, valueId) =&gt; current + valueId + "|") + "'";
</code></pre>

<p>Problem is this gives</p>

<p><code>'1|2|3|'</code></p>

<p>How do I avoid getting that final <code>'|'</code> without resorting to writing an ugly bit of code to remove it if it exists?</p>

<p>Thanks,</p>

<p>Sachin</p>
