I was reading Jon Skeet's refcard on C#. He stated:
"Events are closely related to delegates but they are not the same thing."
So from my understanding, when events are raised, handlers (delegates) execute the code.
I have the following doubts:
(1) When we declare an event , will it be registered in any "REGISTERS?" or "System Registries"?
(2) The Old VB 6.0 style handles the event without delegates ,so why can't we write a event without delegates?
How does the flow going for Win Forms: If I click a button, it will print hello (following example).
button_click( sender,some event args )
{
print();
}
void print( )
{
console.WriteLine ("Hello");
}
How is this event flow internally linked and handled? (What is internally happening in the CLR?)
(3) What is the logic behind the event that prevents the event from returning a value?
Thanks everybody, for spending your golden time.