String parsing C# creating segments?
<p>I have a string in the form of:</p>

<pre><code>"company=ABCorp, location=New York, revenue=10million, type=informationTechnology"
</code></pre>

<p>I want to be able to parse this string out and get "name", "value" pairs in the form of</p>

<p>company = ABCCorp</p>

<p>location= New York etc. </p>

<p>This could be any suitable data structure to store. I was thinking maybe a <code>Dictionary&lt;string, string&gt;()</code> but im open to suggestions.</p>

<p>Is there a suitable way of doing this in C#?</p>

<p>EDIT: My final goal here is to have something like this:</p>

<p>Array[company] = ABCCorp.
Array[location] = New York.</p>

<p>What data structure could we use to achieve the above? MY first thought is a Dictionary but I am not sure if Im missing anything.</p>

<p>thanks</p>
