UrbanPro
true

Learn .Net Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Working with Delegates & Events in .NET

Satish
25/02/2017 0 0

Events & Delegates

A delegate is a reference type derived from the System.Delegate class which can be used to call methods of same matching signature.
As you all know signature of a method is defined by the number, datatypes of the parameters and also the return type of the method.If you are familiar with C/C++, you can consider that, these delegates are similar to the functional pointers.

Events are the actions performed when something is triggered like a button's button_Click event or a text box's text_Changed event.

It so happens that, the Events in .NET are implemented using the delegates.Actually these both are tightly coupled entities, i.e. delegates are used to handle events.

Here publishing class is the one which defines the delegate, and all subscribing classes are the one's which implement the delegate.
When the publishing class raises an event, all the subscribed classes are notified, and the methods are invoked through the delegate.

 

 

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Export To Excel using StringBuilder in ASP.net MVC C#
public ActionResult Export() { StringBuilder sb = new StringBuilder(); //static file name, can be changes as per requirement string sFileName = "filename.xls"; //Bind...
M

Mohammad Shafi

1 0
1

Why a function in C# requires "Return type"??
- Basically , a Method is a piece of code used for the re-usability purpose. - Method is of 2 types Function and Procedure - Function is a method which returns a value to the calling place Function...

While Working, Always Enhance Your Education !!
In Any sector or domain every one must upgrade their education academically or professioally. Since so many times our Woring Knowledge is good but academicically we are week at this front. For Excel...

Be FOCUS !!
We must be very focused about learning & Goals. While learning please check your progress and take feedback at various level. Try Again & Again & Again !!! Deepak Garg

Technology learning Tip
To learn any technology especially related programming you need to think logically and need good practice time. Never try to start from scratch or start reading a book related to to learn a subject. ...
X

Looking for .Net Training Classes?

The best tutors for .Net Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn .Net Training with the Best Tutors

The best Tutors for .Net Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more