title: Convert a string to an enum in C#
body: <p>What's the best way to convert a string to an enumeration value in C#?</p>
  <p>I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value.</p>
  <p>In an ideal world, I could do something like this:</p>
  <pre><code>StatusEnum MyStatus = StatusEnum.Parse(&quot;Active&quot;);
  </code></pre>
  <p>but that isn't a valid code.</p>