I have a List of Books which below :
List<book> books = new List<book>()
{
new() { bookName = "wingbook" },
new() { bookName = "Peter Pan" },
new() { bookName = "Apple Pie" },
new() { bookName = "Zebra" }
}
I want to find way to order by books by index descending order (not a book name). Expected result is
result = {
{ bookName = "Zebra" },
{ bookName = "Apple Pie" },
{ bookName = "Peter Pan" },
{ bookName = "wingbook" }
}
Can I know how to write it simplified it ?