Difference between delegate & events in .net framework

It is containing all topics related to Visual Basic, .NET Framework, Web Resource, GDI etc.
Ladva Nidhi
Posts: 295
Joined: Sat Sep 20, 2014 5:26 pm
Contact:

Difference between delegate & events in .net framework

Postby Ladva Nidhi » Thu Oct 16, 2014 3:14 am

what is the difference between delegate and events?


Guest

Re: Difference between delegate & events in .net framework

Postby Guest » Mon Aug 03, 2015 8:37 am

Event is a mechanism by which a class can send notification to its client. For example, you have an application to perform certain operation, if an operation is failed then the application send the notification to log file, printer, fax, email etc. Events are declared using delegates. Without delegate, we can not create Events.

A delegate object doesn't care about the class in which the function exists. There is only one restriction that the delegate signature and the function signature should be same otherwise delegate object can’t hold the reference of the method which doesn't have the same signature. Signature means return type and parameters.


Return to “Visual Basic .NET and ASP.NET”

Who is online

Users browsing this forum: No registered users and 2 guests