title: How can I convert string value to object property name
body: <p>this is my first time having to do something like this in C#/.NET and somewhat reminds me of what can easily be done in JavaScript using the eval() function or dynamically scripting and generating HTML. I have a string that is taken from user input, lets say <code>string input = "foo"</code>. Now I would like to use the value <code>"foo"</code> as the name of the property for an object I have, say <code>cover</code> in such a way:</p>
  
  <pre><code>string input = "foo";
  //magic to convert string value to be used
  //as a object property name goes here maybe...
  var success = cover.foo;
  </code></pre>
  
  <p>Is there a way in C# that I can do such a thing? Possibly using reflection? I've tried but I always am returned with an object that doesn't really solve my problem.</p>