private static void UpdateModelFromControl(object sender, HraObject hraObject) { Control control = sender as Control; if (control != null) { string name = control.Name; PropertyInfo property = hraObject.GetPropertyWithNameLike(name); if (property != null) { object text = control.Text; property.SetValue(hraObject, text, null); } } }