private static void OrderWithLambda(Students[] studentsArray)
 {
     studentsArray = studentsArray.OrderByDescending(t => t.FirstName).ThenByDescending(t => t.LastName).ToArray();
     foreach (var student in studentsArray)
     {
         Console.WriteLine(student.ToString());
     }
 }
        private static void OrderWithLINQ(Students[] studentsArray)
        {
            var students = from student in studentsArray
                           orderby student.FirstName descending, student.LastName descending
                           select student;

            foreach (var student in students)
            {
                Console.WriteLine(student.ToString());
            }
        }
        static void Main(string[] args)
        {
            Students[] studentsArray = new Students[5];
            studentsArray[0] = new Students("Aaaaaa", "Bbbbbb");
            studentsArray[1] = new Students("Aaaaaa", "Aaaaaa");
            studentsArray[2] = new Students("Aaaaaa", "Gggggg");
            studentsArray[3] = new Students("Aaaaaa", "Hhhhhh");
            studentsArray[4] = new Students("Aaaaaa", "Yyyyyy");

            //Using Lambda Expressions
            OrderWithLambda(studentsArray);

            //Using LINQ 
            OrderWithLINQ(studentsArray);

            //First one is using Array of type Students and the second one is using list => PrintResult method was not worthed
        }
        static void Main(string[] args)
        {
            Students[] studentsArray = new Students[5];
            studentsArray[0] = new Students("Aaaaaa", "Bbbbbb", 20);
            studentsArray[1] = new Students("Cccccc", "Aaaaaa", 25);
            studentsArray[2] = new Students("Zzzzzz", "Ggggggg", 18);
            studentsArray[3] = new Students("Cccccc", "Hhhhhhh", 22);
            studentsArray[4] = new Students("Vvvvvv", "Yyyyyyy", 28);

            var students = from student in studentsArray
                           where (student.Age <= 24 && student.Age >= 18)
                           orderby (student.Age)
                           select student;

            foreach (Students student in students)
            {
                Console.WriteLine(student.ToString());
            }
        }
        static void Main(string[] args)
        {
            Students[] studentArray = new Students[5];
            studentArray[0] = new Students("Aaaaaa", "Bbbbbb");
            studentArray[1] = new Students("Cccccc", "Aaaaaa");
            studentArray[2] = new Students("Zzzzzz", "Ggggggg");
            studentArray[3] = new Students("Cccccc", "Hhhhhhh");
            studentArray[4] = new Students("Vvvvvv", "Yyyyyyy");

            var students = from student in studentArray
                           where student.FirstName.CompareTo(student.LastName) == -1
                           select student;

            foreach (Students student in students)
            {
                //Will Return Age(value = 0), because it is needed for the next task. 
                Console.WriteLine(student.ToString());
            }
        }