public static int CompareStudentsByIntEvalAssignability(Student s1, Student s2) { if (s1.InternalCount < s2.InternalCount) return -1; else if (s1.InternalCount == s2.InternalCount) return 0; else return 1; }
private void ReadStudent(string strline) { String[] _values = strline.Split('|'); String[] studentEvaluatorData = _values[0].Split(','); String[] technologyData = _values[1].Split(','); if (studentEvaluatorData[0].Trim().Length > 0) { Student tempStudent = new Student(); tempStudent.Number = Int32.Parse(studentEvaluatorData[0].Trim()); tempStudent.IndexNumber = studentEvaluatorData[1].Trim(); tempStudent.Name = studentEvaluatorData[2].Trim(); tempStudent.MidGrade = Int32.Parse(studentEvaluatorData[3].Trim()); int result; for (int i = 4; i < studentEvaluatorData.Length; i++) { if (Int32.TryParse(studentEvaluatorData[i], out result)) { tempStudent.InternalPossibleVector.Add(result); if (result == 1) { tempStudent.InternalCountUp(); } } } for (int i = 0; i < technologyData.Length; i++) { if (Int32.TryParse(technologyData[i], out result)) { tempStudent.TechnologyVector.Add(result); } } if (verbose) { tempStudent.Print(); Console.WriteLine(""); } studentList.Add(tempStudent); } }