title: Equivalent to index for enum type in c#?
body: <p>Say I have the following enumerated type:</p>
  
  <pre><code>private enum ranks { ace = "Ace", two = "2", three = "3", four = "4", five = "5", six = "6", seven = "7", 
                       eight = "8", nine = "9", ten = "10", jack = "Jack", queen = "Queen", king = "King" }
  
  ranks rank;
  </code></pre>
  
  <p>I know I can do things like sizeof(ranks) but is there a way to get the nth item in ranks?  Say a user enters 4 and i want to set rank to the 4th enumeration without explicitly doing:</p>
  
  <pre><code>rank = ranks.four;
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>(For the purpose of this example, assume that I MUST use enum and that I know there are other collections more suited for this problem.)</p>
  
  <p>Thanks for the help. :)</p>