title: Is it possible in C# to access an object's fields using field names generated at runtime
body: <p>Here is what I mean:</p>
  
  <p>I need to be able to substitute this ugly looking C# code:</p>
  
  <pre><code>if (attribute.Name == "Name") machinePool.Name = attribute.Value;
  else if (attribute.Name == "Capabilities") machinePool.Capabilities = attribute.Value;
  else if (attribute.Name == "FillFactor") machinePool.FillFactor = attribute.Value;
  </code></pre>
  
  <p>into something like this:</p>
  
  <pre><code>machinePool.ConvertStringToObjectField(attribute.Name) = attribute.Value;
  </code></pre>
  
  <p>There is no ConvertStringToObjectField() method, but I would like to have something like this, if it's possible. I have access to the machinePool object class code, so I can add neccessary code, but I am not sure what code it may be or is it even possible to do in C#. </p>