Example #1
0
 public Student(Person person, Education education, int group)
     : base()
 {
     fName = person.FirstName;
     lName = person.LastName;
     date = person.Date;
     this.education = education;
     this.group = group;
 }
Example #2
0
        private void btnCreatePerson_Click(object sender, EventArgs e)
        {
            tbInfo.Text = "";
            pr1 = new Person();
            pr2 = (Person)pr1.DeepCopy();

            string equa;
            if (pr1.Equals(pr2))
            {
                equa = "Объекты равны";
            }
            else
            {
                equa = "Объекты не равны";
            }
            string hash = "Хэш код Person 1: " + pr1.GetHashCode().ToString() + "\r\n" + "Хэш код Person 2: " + pr2.GetHashCode().ToString();

            tbInfo.Text = "Person 1: " + "\r\n" + pr1.ToString() + "\r\n" + "Person 2: " + pr2.ToString() + "\r\n" + hash + "\r\n" + equa;
        }
Example #3
0
 public Student(Person person, Education education, int group)
 {
     this.person = person;
     this.education = education;
     this.group = group;
 }
Example #4
0
 public Student()
 {
     person = new Person();
     education = Education.Вachelor;
     group = 230;
 }