learn.microsoft.com favicon

Lambda expressions - Lambda expressions and anonymous functions - C# reference | Microsoft Learn

6
Public whispers
6
Contributors
2026-07-22 09:59:31
First whispered

Public whispers on this page

Text Highlight2026-07-22 16:23:31
Original Highlight Excerpt
"Starting with C# 12, you can provide default values for explicitly typed parameter lists."
Whisper Note
Nice, finally no more overloads just for optional lambda params.
Text Highlight2026-07-22 13:20:31
Original Highlight Excerpt
"You can't use statement lambdas to create expression trees."
Whisper Note
Good thing I mostly use expression lambdas for EF queries anyway.
Text Highlight2026-07-22 13:11:31
Original Highlight Excerpt
"You can't use statement lambdas to create expression trees."
Whisper Note
Wait, so my multi-line lambda can't be an expression tree? That explains some errors.
Text Highlight2026-07-22 10:17:31
Original Highlight Excerpt
"Use the lambda declaration operator => to separate the lambda's parameter list from its body."
Whisper Note
Every time I see => I just think of a rocket ship flying to the right, haha.
Text Highlight2026-07-22 10:08:31
Original Highlight Excerpt
"Use the lambda declaration operator => to separate the lambda's parameter list from its body."
Whisper Note
Wait, that's it? I thought the arrow actually did something magical under the hood.
Text Highlight2026-07-22 09:59:31
Original Highlight Excerpt
"Use the lambda declaration operator => to separate the lambda's parameter list from its body."
Whisper Note
Can't live without => honestly, best thing since sliced bread for callbacks.

Share this page's whispers

Share to X
Short link
https://domwhisper.com/s/35d1b2f384a1
Embed snippet
<iframe src="https://domwhisper.com/embed/35d1b2f384a1" width="100%" height="480" style="border:0;border-radius:16px" loading="lazy"></iframe>

See what people are discussing on learn.microsoft.com

Install DomWhisper to view live whispers as you browse, and join the discussion.

Get the extension