public static Student getStudentById(int StudId) { Student stud = null; List <Student> studs = DataStudentUtil.getStudentAllDetails(); return(stud); }
public static Student getStudentById(int StudId) { Student stud = null; List <Student> studs = DataStudentUtil.getStudentAllDetails(); for (int i = 0; i < studs.Count; i++) { stud = studs[i]; if (stud.studentId == StudId) { return(stud); } } return(stud); }