Question
What is the difference between an event and a delegate?

Answers

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. See this post by Julien Couvreur for more discussion.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q MFC philosophy (from a Micro softie!)
  • Q What is the information present in the Cognos configuration file?
  • Q Dal lake is located in?
  • Q In a carnot engine with an efficiency of 40%, the heat rejected to the sink at 27 C is 60 kJ, then the heat supplied in kJ to the engine by the sources is
  • Q What is the name of the instrument that measures wind speed?
  • Q Can a person wipe his head and feet during Wuzu in downward as well as upward direction?
  • Q What is the CPU socket?
  • Q CAR stands for
  • Q Give two examples for two port junctions?
  • Q Swadeshabhimani daily is established by a famous social reformer. Who is the person?
  • Q What happened to golfer Lee Travino on green 13 27 June 1975