Sort List by Property in the Object in .NET

added by DotNetKicks
4/6/2022 3:39:57 PM


In this article, we are going to look at different ways to sort a List by a property in the object. Let's dive in. Let's begin by creating a Book class we are going to work with: public class Book { public string Title { get; set; } public string Author { get; set; } public int Pages { get; set; } } We can sort List by any property in the Book class.