static void Main(string[] args) { Student stud = new Student { Course = 1, FirstName = "Vasya", LastName = "Pupkin", Group = new Group { Name = "SPU021" } }; Student stud2 = stud.Clone(); stud2.FirstName = "Petya"; stud2.LastName = "Ivanov"; stud2.Group.Name = "VP-12"; Console.Read(); }
static void Main(string[] args) { /*Person personOne = new Person(); * personOne.Introduce(); * * Student student = new Student("Jane Doe", 30, "female", "The School of Life"); * student.Introduce(); * * Mentor mentor = new Mentor("Jane Doe", 30, "female", "intermediate"); * mentor.Introduce(); * * Sponsor sponsor = new Sponsor("Jane Doe", 30, "female", "Google"); * sponsor.Introduce();*/ var people = new List <Person>(); /* var mark = new Person("Mark", 46, "male"); * people.Add(mark); * var jane = new Person(); * people.Add(jane);*/ var john = new Student("John Doe", 20, "male", "BME"); people.Add(john); john.Introduce(); Student johnTheClone = (Student)john.Clone(); johnTheClone.Introduce(); /* * var studentTwo = new Student(); * people.Add(student); * var gandhi = new Mentor("Gandhi", 148, "male", "senior"); * people.Add(gandhi); * var mentorTwo = new Mentor(); * people.Add(mentor); * var sponsorTwo = new Sponsor(); * people.Add(sponsor); * var elon = new Sponsor("Elon Musk", 46, "male", "SpaceX"); * people.Add(elon); * * * * student.SkipDays(3); * * for (int i = 0; i < 5; i++) * { * elon.Hire(); * } * * for (int i = 0; i < 3; i++) * { * sponsor.Hire(); * } * * foreach (var person in people) * { * person.Introduce(); * person.GetGoal(); * } * * Cohort awesome = new Cohort("AWESOME"); * awesome.AddStudent(student); * awesome.AddStudent(john); * awesome.AddMentor(mentor); * awesome.AddMentor(gandhi); * awesome.Info();*/ }