title: Using an enum as an array index in C#
body: <p>I want to do the same as in <a href="https://stackoverflow.com/questions/404231/using-an-enum-as-an-array-index">this question</a>, that is:</p>
  
  <pre><code>enum DaysOfTheWeek {Sunday=0, Monday, Tuesday...};
  string[] message_array = new string[number_of_items_at_enum];
  
  ...
  
  Console.Write(custom_array[(int)DaysOfTheWeek.Sunday]);
  </code></pre>
  
  <p>however, I would rather have something integral to so, rather than write this error prone code. Is there a built in module in C# that does just this?</p>