static void Main(string[] args) { UniversityManager um = new UniversityManager(); um.MaleStudents(); um.FemaleStudents(); um.SortStudentsByAge(); um.AllStudentsFromCSULB(); um.StudentAndUniversityNameCollection(); /* * // one way of reversing ints * int[] someInts = { 30, 12, 4, 3, 12 }; * IEnumerable<int> sortedInts = from i in someInts orderby i select i; * IEnumerable<int> reversedInts = sortedInts.Reverse(); * * foreach (int i in reversedInts) * { * Console.WriteLine(i); * } * * * //another way of reversing ints * IEnumerable<int> reversedInts2 = from i in someInts orderby i descending select i; * * foreach (int i in reversedInts2) * { * Console.WriteLine(i); * } * */ // This will print out all students with a chosen Id /* * string input = Console.ReadLine(); * try * { * int intInput = Convert.ToInt32(input); * um.AllStudentsWithSpecificUniId(intInput); * } * catch (Exception) * { * * Console.WriteLine("Please enter a valid number."); * } * */ Console.ReadKey(); }
static void Main(string[] args) { UniversityManager um = new UniversityManager(); um.MaleStudents(); um.FemaleStudents(); um.SortStudentsByAge(); um.AllStudentsFromIllinoisStateUniversity(); um.StudentAndUniversityNameCollection(); /* This is a way of sorting: * int[] someInt = { 30, 12, 4, 3, 12 }; * IEnumerable<int> sortedInts = from i in someInt orderby i select i; * IEnumerable<int> reversedInts = sortedInts.Reverse(); * * foreach(int i in reversedInts) * { * Console.WriteLine(i); * } * * IEnumerable<int> reversedSortedInts = from i in someInt orderby i descending select i; * * foreach (int i in reversedSortedInts) * { * Console.WriteLine(i); * } */ /* * Console.WriteLine("Which University to see?"); * try * { * string inputUniversity = Console.ReadLine(); * int universityInput = Convert.ToInt32(inputUniversity); * um.AllStudentsFromThatUniversity(universityInput); * } * catch (Exception) * { * Console.WriteLine("Wrong Value"); * } */ Console.ReadKey(); }