title: Enum value from display name
body: <p>I am new with C# and I have some troubles with enum.</p>
  
  <p>I have Enum defined like this:</p>
  
  <pre><code>public enum CustomFields
  {
      [Display(Name = "first_name")]
      FirstName = 1,
  
      [Display(Name = "last_name")]
      LastName = 2,
  }
  </code></pre>
  
  <p>What I need is code which will check does display name exist and if so return enum value.</p>
  
  <p>So if I have display name:</p>
  
  <pre><code>var name = "first_name";
  </code></pre>
  
  <p>I need something like:</p>
  
  <pre><code>var name = "first_name";
  CustomFields.getEnumValue(name);
  </code></pre>
  
  <p>This should return:</p>
  
  <pre><code>CustomFields.FirstName;
  </code></pre>