TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Interviews
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
What is the difference between an event and a delegate?
By
Prabhu Raja
in
ASP.NET
on
Dec 25
2011
0
6.7k
1
Post Your Answer
Submit
Dec, 2011
25
An event is just a wrapper for a multicast delegate. Adding a public event to a class is almost the same as adding a public multicast delegate field. In both cases, subscriber objects can register for notifications, and in both cases the publisher object can send notifications to the subscribers. However, a public multicast delegate has the undesirable property that external objects can invoke the delegate, something we'd normally want to restrict to the publisher. Hence events - an event adds public methods to the containing class to add and remove receivers, but does not make the invocation mechanism public.
0
What is Code Access Security (CAS)?
What is a delegate?
Most Popular Job Functions
Developer (1609)
Programmer (1253)
Senior Management (1222)
Sr. Developer (666)
Sr. Programmer (432)
Fresher (402)
Tech Lead (265)
DBA (245)
Team Lead (189)
Project Lead (86)
View All
MOST LIKED QUESTIONS
What are the advantages of using REST in Web API?
Why do you want to leave your current company?
A class provides a default constructor for me. I write a constructor that takes a string as...
Which Is Faster MVC or ASP.net ?
What is file extension of Webservices in .Net?
What is ASP.NET Core?
.NET interview questions :- Can you explain architecture of your project ?
In which situation(s), the use of "Delegate" is a good idea?
What is a View ?Can we insert,Update and delete a view?
What is the difference between Convert.ToString() and .ToString()?