title: parsing string and create Dictionary
body: <p>I have the following string pattern: <code>1:2,2:3</code>. </p>
  
  <p>This is like array in one string:<br>
  The first element is: <code>1:2</code><br>
  The second element is: <code>2:3</code></p>
  
  <p>I want to parse it and create a dictionary:  </p>
  
  <pre><code>1,2 // 0 element in Dictionary  
  2,3 // 1 element in Dictionary  
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>Dictionary&lt;int,int&gt; placesTypes = new Dictionary&lt;int, int&gt;();
  
  foreach (var place in places.Split(','))
  {
     var keyValuePair = place.Split(':');
     placesTypes.Add(int.Parse(keyValuePair[0]), int.Parse(keyValuePair[1]));
  }
  </code></pre>
  
  <p>Is there the best way to do this?   </p>
  
  <p>Thanks.</p>