title: Enum index by Value
body: <pre><code> [FlagsAttribute]
  public enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 };
  </code></pre>
  
  <p>I have an enum as show. I want the ability to get say Colors.Blue is at index 2, index staring from 0.I want to get the index number passing in Colors.Whatever? Can someone post me some snippets...</p>