title: How to insert as first element in dictionary?
body: <p>I have a dictionary structure, with multiple key value pairs inside. </p>
  
  <pre><code>myDict.Add(key1, value1);
  myDict.Add(key2, value2);
  myDict.Add(key3, value3);
  </code></pre>
  
  <p>My dictionary is used as a data source for some control. In the control's dropdown I see the items are like this:</p>
  
  <pre><code>key1
  key2
  key3
  </code></pre>
  
  <p>The order looks identical to my dictionary.
  I know Dictionary is not like arrayList - you can get the index or so.
  I cannot use sortedDictionary.
  Now I need to add one more key value pair to this dictionary at some point of my program and I hope it has the same effect as I do this:</p>
  
  <pre><code>myDict.Add(newKey, newValue);
  myDict.Add(key1, value1);
  myDict.Add(key2, value2);
  myDict.Add(key3, value3);
  </code></pre>
  
  <p>If I do this, I know newKey will display in my control as first element.</p>
  
  <p>I have an idea to create a tempDict, put each pair in myDict to tempDict, then clear myDict, then add pairs back like this:</p>
  
  <pre><code>myDict.Add(newKey, newValue);
  myDict.Add(key1, value1);
  myDict.Add(key2, value2);
  myDict.Add(key3, value3);
  </code></pre>
  
  <p>Is there better way than this?</p>
  
  <p>Thanks!</p>