Learn to program in Visual Basic .NET, the right way

LINQ - Sorting

What are Sorts?

Simply put, a Sort will order a collection in a specific manner.

OrderBy

OrderBy will order a collection by ascending the collection.

The following demonstrates how to execute an OrderBy on a collection:

Fiddle: Live Demo

OrderBy Descending

OrderBy Descending will order a collection by descending the collection

The following demonstrates how to execute an OrderBy Descending on a collection:

Fiddle: Live Demo