Is there a way to refer to a property name with a variable?
Scenario: Object A have public integer property X an Z, so...
public void setProperty(in
I think you mean reflection:
PropertyInfo info = myObject.GetType().GetProperty("NameOfProperty"); info.SetValue(myObject, myValue);