What are the important points to remember while using lambda expressions?

devquora
devquora

Posted On: Feb 22, 2018

 

The important points to remember while using lambda expressions are:
  • A lambda expression can return a value. It may have parameters.
  • With the help of a feature called closure, it is possible to access variables that are present outside of lambda expression.
  • We should use closer feature very cautiously to avoid any kind of problems.
  • Lambda expressions are not used on the operator’s left side.
  • Curly brackets are not required if there is a single statement. However, if there are multiple statements, curly brackets and return values are essential to writing.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    LINQ Interview Questions

    What do you understand by LINQ?

    Language Integrated Query is the collection of standard query operators which adds query facilities into .NET framework..

    LINQ Interview Questions

    What are the three main components of LINQ?

    The three main components of LINQ are:Standard Query Operators: These are the extension methods that form the LINQ p..

    LINQ Interview Questions

    Explain what is select clause and where clause in LINQ?

    Select clause: the select clause selects the interesting aspects of the element by performing a projection on the col..