title: Sorted Dictionary - C#
body: <p>I'm trying to figure out how to create a sorted dictionary where the key is sorted in a non-alphabetical manner.  Is there a way I can define the way I want it to sort?</p>
  
  <p>For example, the keys might be in order like the following:</p>
  
  <pre><code>AAA1X
  AAB1Y
  AAC1Y
  AAA2X
  AAB2Y
  AAC2X
  </code></pre>
  
  <p>Although the first three letters are alphabetical, if I sort as is it will lump them in the wrong order (due to the number). Also note, that there is either a X or Y at the end.  In the code, there will only ever be an X or a Y.  </p>
  
  <p>Even if I can write an enumeration for the ordering of all possible combinations I'd be willing to do that as well, but I'm not sure how I can use the sorted dictionary and an enumeration...</p>
  
  <p>I know this is a bit vague, but any help would be much appreciated!</p>
  
  <p>Cheers!</p>