Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is a delegate, why should you use it and how do you call it ?



What is a delegate, why should you use it and how do you call it ?..

Answer / ajay vikram

A delegate is a reference type that refers to a Shared method of a type or to an instance method of an object. Delegate is like a function pointer in C and C++. Pointers are used to store the address of a thing. Delegate lets some other code call your function without needing to know where your function is actually located. All events in .NET actually use delegates in the background to wire up events. Events are really just a modified form of a delegate.
It should give you an idea of some different areas in which delegates may be appropriate:
• They enable callback functionality in multi-tier applications as demonstrated in the examples above. <o:p></o:p>
• The CacheItemRemoveCallback delegate can be used in ASP.NET to keep cached information up to date. When the cached information is removed for any reason, the associated callback is exercised and could contain a reload of the cached information. <o:p></o:p>
• Use delegates to facilitate asynchronous processing for methods that do not offer asynchronous behavior.
• Events use delegates so clients can give the application events to call when the event is fired. Exposing custom events within your applications requires the use of delegates.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Which layer executed first among these Application layer,Buisness layer or Data Base Layer?

2 Answers   L&T,


Does unity use c++ or c#?

0 Answers  


What are the advantages of properties in c#?

0 Answers  


Explain About sn.exe

0 Answers  


What are extender provider components?

0 Answers  


Which is the base class in c#?

0 Answers  


FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ?EITHER dn OR new Dotnet() and CAN YOU PROVE YOUR ANSWER?????PLEASE REPLY...

1 Answers  


Hello.. This is kali prasad. i wish to learn C#. kindly guide me in making me expert in c#.

2 Answers  


Explain the difference between and xml documentation tag?

0 Answers  


how to stored and retrive video in Sql server using asp.net c#......?

0 Answers   Sans Pareil IT Services,


How do you achieve polymorphism in c#?

0 Answers  


In which format you can pass the value in the sleep function?

0 Answers  


Categories