What is the use of 'orderby' keyword in C#?

 Posted by Goud.Kv on 9/29/2014 | Category: C# Interview questions | Views: 631 | Points: 40
Answer:

orderby (clause) is the C#'s contextual keyword used to define sorting, either ascending or descending to a query.
So, it defines a sorting algorithm to the result that is being queried.
ascending is the default sorting order of orderby clause. We have to make it to descending to achieve elements in descending order.


Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response