I am comfortable with Vb.Net events and handlers. Can anybody will help me with how to create event handlers in c#, and raise events.
In C# 2 and up you add event handlers like this:
yourObject.Event += someMethodGroup;
Where the signature of someMethodGroup
matches the delegate signature of yourObject.Event
.
In C# 1 you need to explicitly create an event handler like this:
yourObject.Event += new EventHandler(someMethodGroup);
and now the signatures of the method group, event, and EventHandler
must match.