title: Getting variable by name in C#
body: <p>Is there a way to get the value of a variable just by knowing the name of it, like this:</p>
  
  <pre><code>double temp = (double)MyClass.GetValue("VariableName");
  </code></pre>
  
  <p>When I normally would access the variable like this</p>
  
  <pre><code>double temp = MyClass.VariableName;
  </code></pre>