We use OrderBy extension method of LINQ. This takes only single element and we have to choose a property name on which we want to sort the collection. In the above example, we return Rank property from the extension method. This extension method returns IOrderedEnumerable<Student> collection which is sorted by Rank property.

By using this operator, we can only sort the sequence based on a single property, but if we want to sort the collection based on multiple properties then we have to use ThenBy Operator that we will see in our next tutorial.