Hi,
Of course you can do it using reflection:
ctr.GetType().GetProperty(oProperty).SetValue( ctr,newVal, null);
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Nicolas" <nl*****@hotmail.com> wrote in message
news:OK****************@TK2MSFTNGP10.phx.gbl...
How can I do this in Csharp
private void applyColor(Control ctr, string oProperty, Color newVal)
{
ctr.oProperty= newVal;
}
Need to Evaluate (ctr.oProperty) so the program understand for example
(this.Button1.BackColor = newVal)
Than you for your help