Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
❔ Finding max from the list using lambda expression - C#
C
C#
•
4y ago
•
5 replies
my2ndangelic
❔ Finding max from the list using lambda expression
Hello
, I have an example of a following list
, something like
{1
, 2
, 3
, 4
, 5
, 6
}
I want to find the max element of this list using lambda expression
. So this is what I coded
List<int> sample;
int max = sample.Max(e => e);
List<int> sample;
int max = sample.Max(e => e);
Do we have to fill in the expression in List
.Max
? Is there other way to do it
? Thank you
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
❔ Filter list with lambda expression?
C
C# / help
3y ago
LINQ Lambda-Expression Diff
C
C# / help
4y ago
✅ Delegate vs lambda function/expression
C
C# / help
11mo ago
Comments in curried lambda expression
C
C# / help
2y ago