Bird
Raised Fist0

Which LINQ method would you use to sort a list of strings in descending alphabetical order?

easy🧠 Conceptual Q2 of Q15
C Sharp (C#) - LINQ Fundamentals
Which LINQ method would you use to sort a list of strings in descending alphabetical order?
AOrderBy
BOrderByDescending
CSortDescending
DReverseOrder
Step-by-Step Solution
Solution:
  1. Step 1: Identify the method for descending order

    The method OrderByDescending sorts elements in descending order.
  2. Step 2: Confirm the method name

    There is no built-in LINQ method named SortDescending or ReverseOrder.
  3. Final Answer:

    OrderByDescending -> Option B
  4. Quick Check:

    Use OrderByDescending for descending sort [OK]
Quick Trick: Use OrderByDescending to sort descending easily [OK]
Common Mistakes:
MISTAKES
  • Using OrderBy and expecting descending order
  • Assuming SortDescending exists in LINQ
  • Confusing ReverseOrder with sorting methods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Sharp (C#) Quizzes