Prashant Jadhav

Prashant Jadhav

  • NA
  • 38
  • 14.3k

delegate and anonymous method

Jul 19 2014 8:58 AM
hi guys 
i have a question about anonymous method. i can understand the use of delegate since we can make call to number of named methods,which seems very useful but when delegate are use with anonymous method i can't understand its use since when an delegate is instantiated with a single anonymous  method it has capabilities to cal that single method only, in such scenario why don't we create single named method and call it when needed in program .
one more thing i want to ask is i read at so many place that anonymous method can access variable in outer scope i don't find any special thing in it because even any function member of an class can access member field of that class which are in outer scope .can any one please explain me in what scenario delegate with anonymous method provide best way of solution. 

Answers (1)