What's the difference between an event and a delegate?

What's the difference between an event and a delegate?

  • Comments 1

Put simply, an event gives more limited access than a delegate. If an event is made public, code in other classes can only add or remove handlers for that event; they can't necessarily fire it, find out all the handlers for it, or remove handlers they don't know about. Events also allow more flexibility in terms of how the handlers are stored. For more details on this, see Eric Gunnerson's article on the topic.

[Author: Jon Skeet]

Leave a Comment
  • Please add 5 and 6 and type the answer here:
  • Post
Page 1 of 1 (1 items)