Finding the maximum value in a sequence with LINQ C# – C# Programming Example
Collection Linq

Finding the maximum value in a sequence with LINQ C#

Finding the maximum value in a sequence.

 

Think that we have a student class as following

For tutorial, list sequences like this

And I want to find oldest stutent’s age from the sutents list, here is the Linq Code

 

If you want to find oldest student’s name from the list using LINQ

 

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: