c# NameValueCollection distinct values
<p>C# code as below:</p>

<pre><code>NameValueCollection nvc = new NameValueCollection();
nvc.Add("color", "red");
nvc.Add("size", "s");
nvc.Add("color", "red");
nvc.Add("size", "m");
nvc.Add("color", "red");
nvc.Add("size", "l");

//blue
nvc.Add("color", "blue");
nvc.Add("size", "m");
nvc.Add("color", "blue");
nvc.Add("size", "l");
//green
nvc.Add("color", "green");
nvc.Add("size", "s");
nvc.Add("color", "green");
nvc.Add("size", "m");
nvc.Add("color", "green");
nvc.Add("size", "l");
</code></pre>

<p>actual result: </p>

<pre><code>color:red,red,red,blue,blue,green,green,green 
size:s,m,l,m,l,s,m,l 
</code></pre>

<p>hope result: </p>

<pre><code>color:red,blue,green     
size:s,m,l 
</code></pre>