title: C#, StringToEnum, can I make it a generic function out of this
body: <p>I'd like to have a simple helper method for converting a string to an Enum. Something like the following, but it doesn't like T as the first argument in the Enum.Parse. The error is T is a Type Parameter but is used like a variable.        </p>
  
  <pre><code>public static T StringToEnum&lt;T&gt;(String value)
          {
              return (T) Enum.Parse(T,value,true) ;
          }
  </code></pre>