private static object getValue(dfFont control, string propertyName) { var property = control.GetType().GetProperty(propertyName); if (property == null) { throw new ArgumentException("Property '" + propertyName + "' does not exist on " + control.GetType().Name); } return(property.GetValue(control, null)); }
private static void setValue(dfFont control, string propertyName, object value) { var property = control.GetType().GetProperty(propertyName); if (property == null) { throw new ArgumentException("Property '" + propertyName + "' does not exist on " + control.GetType().Name); } property.SetValue(control, value, null); }
private static void setValue( dfFont control, string propertyName, object value ) { var property = control.GetType().GetProperty( propertyName ); if( property == null ) throw new ArgumentException( "Property '" + propertyName + "' does not exist on " + control.GetType().Name ); property.SetValue( control, value, null ); }