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

The Common Language Runtime
i. It is important to understand that the CLR is an execution environment for .NET applications and that includes applications written in C#, F#, VB.Net and other languages that target the .Net Framework. ...

Remote Learning Do's and Dont's
In the Present fast-paced world, people are facing challenges concerning keeping themselves always with the up to date technologies or industry changes. When it comes to the IT industry, it is becoming...
V

Roll up your sleeves and get knee deep into coding!
Practise, make mistakes, learn to search for solutions,seek help when stuck badly! Just attending classes won't make you good at coding!!!

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

Dependency Injection in Angular 2
Dependency injection Dependency injection is a way to supply a new instance of a class with the fully-formed dependencies it requires. Most dependencies are services. Angular uses dependency injection...

Looking for .Net Training ?

Learn from Best Tutors on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
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