Solarion
Honorary Master
- Joined
- Nov 14, 2012
- Messages
- 28,051
- Reaction score
- 17,804
A good article this
Expression API Cookbook
Expression API Cookbook
Lambda expressions should be short. A complex definition makes the calling code difficult to read.
Lambda basic definition: Parameters => Executed code
What is a Lambda Expression?
Why do we need lambda expressions? (Why would we need to write a method without a name?)
Reduced typing. No need to specify the name of the function, its return type, and its access modifier.
When reading the code, you don't need to look elsewhere for the method's definition.
How do we define a lambda expression?