What is lambda expressions in C#?
What is lambda expressions in C#?
Lambda expressions in C# are anonymous functions that can be used to create delegates or expression tree types. They provide a concise syntax for defining methods without explicitly declaring a named method.
The syntax for a lambda expression is:
(input-parameters) => expression
or
(input-parameters) => { <sequence-of-statements> }
The left side specifies the input parameters (if any) and the right side is the expression or statement block.
Some key points about lambda expressions:
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.