Differnece between Events and Delegates

Discussion in 'ASP .Net' started by Gopal Prabhakaran, Jan 26, 2004.

  1. Dear Guys

    Pls tell me the difference between Events and Delegates..

    Thanx
    Gopal Prabhakaran
    Gopal Prabhakaran, Jan 26, 2004
    #1
    1. Advertising

  2. There isn't much. A delegate is a wrapper around a method call, an event is
    basically a special property that contains a delegate with protection
    provided by the language. Events are accessed through a set of property
    methods(public add_EventName(Delegate d), public remove_EventName(Delegate
    d), and sometimes a protected raise_EventName(not sure of the sig, think its
    just EventArgs e)) which allows you to ensure that callers outside of your
    class don't raise the event or don't clear all the event listeners for
    example, while still allowing them to add and remove their own handlers.
    "Gopal Prabhakaran" <> wrote in message
    news:%...
    > Dear Guys
    >
    > Pls tell me the difference between Events and Delegates..
    >
    > Thanx
    > Gopal Prabhakaran
    >
    >
    Daniel O'Connell, Jan 26, 2004
    #2
    1. Advertising

  3. Hi!

    These should help you:

    http://msdn.microsoft.com/library/en-us/csref/html/vcwlkdelegatestutorial.asp
    http://msdn.microsoft.com/library/en-us/csref/html/vcwlkEventsTutorial.asp
    http://www.devmail.net/help/devmail.usingevents.html

    --
    Regards,
    Kumar Gaurav Khanna
    -----------------------------------------------------------------
    Microsoft MVP - C#/.NET, MCSE Windows 2000/NT4, MCP+I
    WinToolZone - Spelunking Microsoft Technologies
    http://www.wintoolzone.com/
    OpSupport - Spelunking Rotor
    http://opsupport.sscli.net/
    Bangalore .NET Users' Group
    http://groups.msn.com/bdotnet/
    "Gopal Prabhakaran" <> wrote in message
    news:%...
    > Dear Guys
    >
    > Pls tell me the difference between Events and Delegates..
    >
    > Thanx
    > Gopal Prabhakaran
    >
    >
    Gaurav Khanna [C# MVP], Jan 28, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bredal Jensen

    Events and delegates.

    bredal Jensen, Apr 29, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    393
    bredal Jensen
    Apr 30, 2004
  2. Veronica Jacobs

    Events and Delegates

    Veronica Jacobs, Jun 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    383
    John Saunders
    Jun 2, 2004
  3. baumann@pan
    Replies:
    1
    Views:
    730
    Richard Bos
    Apr 15, 2005
  4. Tagore

    Any differnece between functions

    Tagore, Jan 23, 2009, in forum: C Programming
    Replies:
    13
    Views:
    492
    jaysome
    Jan 24, 2009
  5. Sijo Kg
    Replies:
    6
    Views:
    138
    Florian AƟmann
    Feb 15, 2009
Loading...

Share This Page