private List <string> GetAllPropertyNameOfStudentViewModel() { var StudentViewModel = new StudentViewModel(); var type = StudentViewModel.GetType(); return(ReflectionUtilities.GetAllPropertyNamesOfType(type)); }
private void StudentViewControl_Loaded(object sender, RoutedEventArgs e) { var obj = new StudentViewModel(); var type = obj.GetType(); var method = type.GetMethod("Print"); method.Invoke(obj, null); StudentViewModel studentViewModelObject = new StudentViewModel(); studentViewModelObject.LoadStudents(); StudentViewControl.DataContext = studentViewModelObject; }