What are the features of anonymous delegate or method?

 Posted by Rajesh_Kumar on 2/20/2014 | Category: C# Interview questions | Views: 889 | Points: 40
Answer:

Following are the features of anonymous delegate or method:

1. We can access any variable inside the anonymous method which are declared outside of the anonymous method.
2. We use anonymous method when working with event handling
3. An anonymous method when declared without parenthesis can be assigned to a delegate with any signature.
4. Unsafe code can’t be accessed within an anonymous method.
5. An anonymous method can’t access the ref or out parameters of an outer scope.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response