Пример #1
0
 public void CreatGarbage()
 {
     for (int i = 0; i < 100000; i++)
     {
         Student1 p = new Student1();
     }
 }
Пример #2
0
        public object Clone()
        {
            Student1 temp = (Student1)this.MemberwiseClone();

            temp.StudentCard = new StudentCard
            {
                Series = this.StudentCard.Series,
                Number = this.StudentCard.Number
            };
            return(temp);
        }
        static void Main(string[] args)
        {
            Student1 stu = new Student1(14, "焦康");

            stu.AboutMe();
        }
Пример #4
0
 static int SortByDate(Student1 a, Student1 b)
 {
     return(DateTime.Compare(a.BirthDay, b.BirthDay));
 }
Пример #5
0
 static bool StSpring(Student1 st)
 {
     return(st.BirthDay.Month > 2 && st.BirthDay.Month < 6);
 }
Пример #6
0
 static bool St80(Student1 st)
 {
     return(st.BirthDay.Year > 1980);
 }
Пример #7
0
 static string FullName(Student1 s)
 {
     return(s.Surname + " " + s.Name);
 }
Пример #8
0
 static void GetFullName(Student1 s)
 {
     Console.WriteLine($"{s.Name} {s.Surname}");
 }