List out some of the features of Local Function of C#7.0

 Posted by Rajnilari2015 on 6/23/2016 | Category: C# Interview questions | Views: 1658 | Points: 40
Answer:

Local functions allows us to define a function inside the scope/block of another function. It allows to declare methods and types in block scope just like variables. Some of the features of Local Functions are listed below -

1) We can use Caller info attributes on parameters
2) Local functions can be generic.
3) Support for optional/default/named arguments
4) Can capture variables (like a lambda)
5) It can be recursive
6) Supports Expression Bodied Function
7) Support for Iterator functions
8) Support for Async functions


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response