Example #1
0
        //Problem 14
        public static void SortByAtleastTwoMarks(IEnumerable <Student> studentsGroup)
        {
            var sorted = ExtenssionMetod.ExtensionSortByAtLeastTwoMarks(studentsGroup);

            Console.WriteLine("Student with atleast two marks");

            foreach (var student in sorted)
            {
                Console.WriteLine(student.ToString() + "[" + string.Join(", ", student.Marks) + "]");
            }
            Console.WriteLine();
        }
Example #2
0
        //Problem 9
        public static void SortByGroup(IEnumerable <Student> studentsGroup)

        {
            var sorted =
                from st in studentsGroup
                where st.GroupNumber == 2
                orderby st.FirstName
                select st;

            var sorted1 = ExtenssionMetod.ExtensionSortByGroup(studentsGroup); // problem 10

            Console.WriteLine("Student from group 2 ordered by first name");

            PrintStudent(sorted);
            PrintStudent(sorted1);
        }