Appending a string in a loop in effective way
<p>for long time , I always append a string in the following way.</p>

<p>for example if i want to get all the employee names separated by some symbol , in the below example i opeted for pipe symbol.</p>

<p>string final=string.Empty;</p>

<pre><code>foreach(Employee emp in EmployeeList)
{
  final+=emp.Name+"|"; // if i want to separate them by pipe symbol
}
</code></pre>

<p>at the end i do a substring and remove the last pipe symbol as it is not required</p>

<pre><code>final=final.Substring(0,final.length-1);
</code></pre>

<p>Is there any effective way of doing this.</p>

<p>I don't want to appened the pipe symbol for the last item and do a substring again.</p>
