Using System; using System. collections. generic; using System. text; using System. collections; namespace StudenManager {struct student {public int id; public string name; public int age; public string sex;} class Manager {student stu = new student (); arrayList list = new ArrayList (); public void Menu () {Console. writeLine ("1. add Student Information 2. querying Student Information 3. modify student information 4. delete Student Information 5. exit System "); int messager = int. parse (Con Sole. readLine (); while (true) {switch (messager) {case 1: addStudent (stu); break; case 2: // Console. clear (); Res (stu); break; case 3: idUpdate (list); break; case 4: del (list); break; case 5: ret (); break;} // break;} public void addStudent (student stu) {a: Console. clear (); Console. writeLine ("Enter the student ID:"); stu. id = int. parse (Console. readLine (); Console. writeLine ("Enter the Student name:"); stu. name = Consol E. readLine (); Console. writeLine ("Enter the student's age:"); stu. age = int. parse (Console. readLine (); Console. writeLine ("Enter the student's Gender:"); stu. sex = Console. readLine (); list. add (stu); Console. writeLine ("added successfully! "); Console. writeLine ("1. continue adding 2. return to the main menu "); int sel = int. parse (Console. readLine (); switch (sel) {case 1: goto a; case 2: Console. clear (); Menu (); break;} public void Res (student stu) {Console. writeLine ("1. query all 2. query by student ID 3. query by name "); int messager = int. parse (Console. readLine (); switch (messager) {case 1: fullRes (list); break; case 2: idRes (list); break; case 3: nameRes (list ); break ;}} public void fullRes (ArrayList list) {foreach (student stu in list) {Console. writeLine (stu. id + "" + stu. name + "" + stu. age + "" + stu. sex);} Console. readLine (); Console. clear (); Menu ();} public void idRes (ArrayList list) {Console. writeLine ("Enter the student ID to query:"); int id = int. parse (Console. readLine (); foreach (student stu in list) {if (id. equals (stu. id) Console. writeLine (stu. id + "" + stu. name + "" + stu. age + "" + stu. sex + "" + list. indexOf (stu);} Console. readLine (); Console. clear (); Menu ();} public void nameRes (ArrayList list) {Console. writeLine ("enter the name of the student to be queried:"); string name = Console. readLine (); foreach (student stu in list) {if (name. equals (stu. name) Console. writeLine (stu. id + "" + stu. name + "& quo