Sanjeev Singh
What is delegates and events in ASP.NET 2.0.
By Sanjeev Singh in ASP.NET on Nov 26 2008
  • MITHUN KANUNGO
    Dec, 2008 6

    Delegate and Events are use in common , Delegate is Like function pointer in C( a pointer holding the refference  to a Function )  , the difference between Function pointer and delegate is that delegates are strongly typed i.e. only at run time it knows which function to point , events are the Events which occured in an application , for every event we need an eventhandeler in our application , but we can have so many event and so many event handelers , to bind an event to its eventhandeller at runtime we use delegate , delegate matches the signature of the Eventhandeler if it match with the delegate signature then control will move to that event handeler , but before that we need to bind the event to a eventhandeler . we can do this by using += operator.

    • 0
  • P Narasimha
    Nov, 2008 27

    Hi,

    Delegate :Dalegate is Nothing but it can be hold the Addresss of Function,it will improve the Performance of the Application,

    Event:Event is nothing But Action Identified the particular Instance ,Example :Button Click Event

    Thanks,

    Narasima

     

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS