コード例 #1
0
        private List <string> GetAllPropertyNameOfStudentViewModel()
        {
            var StudentViewModel = new StudentViewModel();
            var type             = StudentViewModel.GetType();

            return(ReflectionUtilities.GetAllPropertyNamesOfType(type));
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: rtenet/test1
        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;
        }