Convert Dictionary<string,string> to semicolon separated string in c#
<p>Simple one to start the day, given a <code>Dictionary&lt;string, string&gt;</code> as follows:</p>

<pre><code>var myDict = new Dictionary&lt;string, string&gt;();
myDict["A"] = "1";
myDict["B"] = "2";
myDict["C"] = "3";
myDict["D"] = "4";
</code></pre>

<p>I wish to create a string: <code>"A=1;B=2;C=3;D=4"</code></p>

<p>An example implementation:</p>

<pre><code>var myStringBuilder = new StringBuilder();
bool first = true;
foreach (KeyValuePair&lt;string, string&gt; pair in myDict)
{
    if (first)
    {
        first = false;
    }
    else
    {
        myStringBuilder.Append(";");
    }

    myStringBuilder.AppendFormat("{0}={1}", pair.Key, pair.Value);
}

var myDesiredOutput = myStringBuilder.ToString();
</code></pre>

<p>Note the dictionary is likely to have less than 10 items which suggests that a StringBuilder is overkill.</p>

<p>What alternative implementations are more succinct / efficient? Does the framework have any features that will help?</p>
