public void AddStudent(ref Student student) { studentlist[number] = student; sorce += student.Sorce; if (studentlist[maxi_SX].Sorce.SHUXUE1 < student.Sorce.SHUXUE1) { maxi_SX = number; } if (studentlist[maxi_YW].Sorce.YUWEN1 < student.Sorce.YUWEN1) { maxi_YW = number; } if (studentlist[maxi_YY].Sorce.SHUXUE1 < student.Sorce.YINGYU1) { maxi_YY = number; } number++; }
public Student(string number, string name, int YUWEN, int SHUXUE, int YINGYU) { this.sorce = new Sorce(YUWEN, SHUXUE, YINGYU); this.name = name; this.number = number; }