title: Get value of constant by name
body: <p>I have a class with constants. I have some string, which can be same as name of one of that constants or not.</p>
  
  <p>So class with constants <code>ConstClass</code> has some <code>public const</code> like <code>const1, const2, const3...</code> </p>
  
  <pre><code>public static class ConstClass
  {
      public const string Const1 = "Const1";
      public const string Const2 = "Const2";
      public const string Const3 = "Const3";
  }
  </code></pre>
  
  <p>To check if class contains <code>const</code> by name i have tried next :</p>
  
  <pre><code>var field = (typeof (ConstClass)).GetField(customStr);
  if (field != null){
      return field.GetValue(obj) // obj doesn't exists for me
  }
  </code></pre>
  
  <p>Don't know if it's realy correct way to do that, but now i don't know how to get value, cause <code>.GetValue</code> method need obj of type <code>ConstClass</code> (ConstClass is static)</p>