0% found this document useful (0 votes)
36 views5 pages

Programming C# 2.0, 3.0, 4.0: Muhammed Ali Sakhi Microsoft Certified Trainer

This document discusses events in C# programming. It explains that events allow objects to publish notifications or signals to subscriber objects. Publishers raise events to alert subscribers, whose methods will be called. Events should pass a sender object as the first parameter and use EventArgs to pass any additional parameters to avoid issues. The document demonstrates events and concludes by thanking the reader.

Uploaded by

alisakhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views5 pages

Programming C# 2.0, 3.0, 4.0: Muhammed Ali Sakhi Microsoft Certified Trainer

This document discusses events in C# programming. It explains that events allow objects to publish notifications or signals to subscriber objects. Publishers raise events to alert subscribers, whose methods will be called. Events should pass a sender object as the first parameter and use EventArgs to pass any additional parameters to avoid issues. The document demonstrates events and concludes by thanking the reader.

Uploaded by

alisakhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Programming C# 2.0, 3.0, 4.

Muhammed Ali Sakhi


Microsoft Certified Trainer

© PakDev.net
How events work
Publisher
Raise an event to alert all interested objects

Subscribers
Provides a method to be called when the event
raised

© PakDev.net
Passing Event Parameters
Return type of the delegate should be void

Practice:
Parameter for events should be passed as
EventArgs
Pass the event publisher (sender) as the first
parameter to the method

© PakDev.net
Events

Demo

© PakDev.net
Thank you
PakDev.net

© PakDev.net

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy