0

(analogy would be very helpful). The answer so far on this topic either lacking the three subjects or are not clear enough for me.

Hurry
  • 19
  • 1
  • 2
  • 3
    a quick search would answer this... – Mitch Wheat Aug 15 '11 at 10:10
  • 2
    possible duplicate of [What is the difference between a delegate and events?](http://stackoverflow.com/questions/29155/what-is-the-difference-between-a-delegate-and-events) – sll Aug 15 '11 at 10:11
  • 2
    This topic is really good explained by the MSDN. Have you even tried searching the web? http://msdn.microsoft.com/en-us/library/17sde2xt.aspx and much more MSDN links provide a lot of information on delegates and events – Matten Aug 15 '11 at 10:11

3 Answers3

5

Method = a function in a class.

Delegate = a pointer to a Method.

Event = a delegate with special restrictions - it can only be invoked by the class that declares it

Dean Chalk
  • 20,076
  • 6
  • 59
  • 90
3

Method - a function with some logic.

Delegate - a function pointer. You can think of it as a variable which can reference methods.

Event - a collection of delegates, which you can execute/invoke at will.

niaher
  • 9,460
  • 7
  • 67
  • 86
1

A method is a member function.

A delegate is an object that can hold a member-function.

An event is, well, an event. With each event there is one associated delegate. All the methods that are held in the delegate are called when the event is fired

Armen Tsirunyan
  • 130,161
  • 59
  • 324
  • 434