public void StudyItemSetter(StudyItem item, string value) { PropertyInfo property = typeof(Student).GetProperty(item.ToString()); MethodInfo method= property.GetSetMethod(); method.Invoke(this, new object[] { value }); }
public string StudyItemGetter(StudyItem item) { PropertyInfo property = typeof(Student).GetProperty(item.ToString()); MethodInfo method = property.GetGetMethod(); return (string)method.Invoke(this, new object[] { }); }