Загрузка данных


using System.ComponentModel;

namespace StudentProfile
{
    public class Student : INotifyPropertyChanged
    {
        private string lastName;
        private string firstName;
        private int age;
        private string group;
        private bool hasScholarship;
        private string specialty;

        public string LastName
        {
            get { return lastName; }
            set
            {
                lastName = value;
                OnPropertyChanged("LastName");
            }
        }

        public string FirstName
        {
            get { return firstName; }
            set
            {
                firstName = value;
                OnPropertyChanged("FirstName");
            }
        }

        public int Age
        {
            get { return age; }
            set
            {
                age = value;
                OnPropertyChanged("Age");
            }
        }

        public string Group
        {
            get { return group; }
            set
            {
                group = value;
                OnPropertyChanged("Group");
            }
        }

        public bool HasScholarship
        {
            get { return hasScholarship; }
            set
            {
                hasScholarship = value;
                OnPropertyChanged("HasScholarship");
            }
        }

        public string Specialty
        {
            get { return specialty; }
            set
            {
                specialty = value;
                OnPropertyChanged("Specialty");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this,
                new PropertyChangedEventArgs(propertyName));
        }
    }
}