Difference between events and delegates

Discussion in 'C#' started by go4expert, Jun 4, 2007.

  1. go4expert

    go4expert Moderator

    Joined:
    Aug 3, 2004
    Messages:
    306
    Likes Received:
    9
    Trophy Points:
    0
    What is the difference between Delegates and events?
     
  2. Statement

    Statement New Member

    Joined:
    Mar 12, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    There are a few differences between the two of them. I am not sure I get all the differences, but those I know of is that events can only be triggered by the class that owns the event. That is, you can't externally trigger an objects event directly. I am not sure, but I think also that events supports many callback handlers where a delegate only supports one. I might be wrong on this one :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice