MCQs > IT & Programming > .NET > Suppose you want to eliminate duplicate elements from the array int[] source = { 7, 4, 1, 3, 9, 8, 6, 7, 2, 1, 8, 15, 8, 23} and sort the elements in descending order using LINQ in .Net framework 4.0. Which of the following statements can you use?

.NET MCQs

Suppose you want to eliminate duplicate elements from the array

int[] source = { 7, 4, 1, 3, 9, 8, 6, 7, 2, 1, 8, 15, 8, 23}

and sort the elements in descending order using LINQ in .Net framework 4.0. Which of the following statements can you use?


Answer

Correct Answer: var result = (from s in source orderby s descending select s).Distinct();

Explanation:

Note: This Question is unanswered, help us to find answer for this one

.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

.NET Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it