title: How to get value from description using Enum
body: <p>I have an enum like</p>
  
  <pre><code>public enum Test {a = 1, b, c, d, e }
  </code></pre>
  
  <p>and then I have a method where I pass 'a' as parameter but i need to retrieve corresponding value from enum and return <code>Integer</code> value from method</p>
  
  <pre><code>public int Getvalue(string text)        
  {                
      int value = //Need to convert text in to int value.    
      return value;   
  }
  </code></pre>
  
  <p>I am passing <code>text</code> as "a" or "b" or "c" but need 1, 2 or 3 as result. I have tried some solution found online but all seems to want me have <code>[Description]</code> tag added in enum to get value.</p>
  
  <p>Is it possible to get value from description in enums in C#?</p>