Given this code:
Book[] books = new Book[3]
{
new Book("100", "Title1"),
new Book("200", "Title2"),
new Book("200", "Title3"),
};
getBookWithMostPages() {
var max = books.Max(book => book.pages);
return books.FirstOrDefault((book) => book.pages == max);
}
Is it possible (there is any documented way) to chain Max and FirstOrDefault and return the same result ?