Lambda expressions of understanding

Lambda  expressions, anonymous function, it can be used to simplify the code efficiency

Operator expressions () =>, on the left is an input parameter, the right is an expression or a statement block, a plurality of parameters may be good, only one parameter may be omitted parentheses 

 

Receive return

 

1 var x =(a,b,c)=>{return a+b+c;}

 

 

transfer

 

1  x(1,2,3);

 

Guess you like

Origin www.cnblogs.com/anjoe/p/11027995.html