public void CreatGarbage() { for (int i = 0; i < 100000; i++) { Student1 p = new Student1(); } }
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(); }
static int SortByDate(Student1 a, Student1 b) { return(DateTime.Compare(a.BirthDay, b.BirthDay)); }
static bool StSpring(Student1 st) { return(st.BirthDay.Month > 2 && st.BirthDay.Month < 6); }
static bool St80(Student1 st) { return(st.BirthDay.Year > 1980); }
static string FullName(Student1 s) { return(s.Surname + " " + s.Name); }
static void GetFullName(Student1 s) { Console.WriteLine($"{s.Name} {s.Surname}"); }