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

"foreach" loop in C#
foreach is a looping statement : repeats a group of statements for each element in an array or an object collection. (or) used to iterate through the collection/ an array to get the required information. Advantages: Easy...

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...

Garbage collector [ GC ] in .NET framework
Garbage collector is responsible for the "automatic memory management - AMM" in .NET framework. Garbage collector is one of the properties of .NET framework components CLR . Why there is a need of "Memory...

CLR [ Common Language Runtime ] and it's properties
CLR is one of the components of the .NET framework which provides an environment to execute the .NET code or the managed code. , CLR helps in converting the MSIL/CIL code into native code and running...

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