Refer to a property name by variable
<p>Is there a way to refer to a property name with a variable? </p>

<p>Scenario: Object A have public integer property X an Z, so...</p>

<pre><code>public void setProperty(int index, int value)
{
    string property = "";

    if (index == 1)
    {
        // set the property X with 'value'
        property = "X";
    }
    else 
    {
        // set the property Z with 'value'
        property = "Z";
    }

    A.{property} = value;
}
</code></pre>

<p>This is a silly example so please believe, I have an use for this.</p>
