Events are similar to properties.
Both of them are declared to be of certain type,which in case of an event it is forced to be delegate type,The reason for having events in the first place is very much like the reason for having properties.
Wednesday, August 10, 2011
Tuesday, August 9, 2011
Difference between Delegate and MulticastDelegate?
What is delegate?
A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value.
What is Multicast delegates?
Multicast delegates nothing more than normal delegates that have multiple method references in their invocation list
Note:delegate and multicast delegates are not two types of delegates it is the way we are implementing delegates if we assigned only one method it is single cast if more methods its multicast like wise.
A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value.
What is Multicast delegates?
Multicast delegates nothing more than normal delegates that have multiple method references in their invocation list
Note:delegate and multicast delegates are not two types of delegates it is the way we are implementing delegates if we assigned only one method it is single cast if more methods its multicast like wise.
Subscribe to:
Comments (Atom)