Delegate, lambda expressions

Entrust

When only one parameter, the braces can be omitted out.

When a plurality of parameters with a comma (,) separated, parameter type may be omitted.

 

The method is only one line of code, called lambda expressions, braces may be omitted and the result of the expression will return automatically.

lambda syntax: to simplify the declarations method

Using lambda expressions, the code can be simplified to reduce the redundant code.

 

Guess you like

Origin www.cnblogs.com/zlwei23/p/10942588.html