Delegates act like Function Pointers... By that I mean that they basically point to a function/method and act like a method itself... Delegate is an object which are usually used to call events or methods... You can also call Multiple methods... Such Delegates are called as Multicast Delegates. Basically when you declare a delegate then a class of that Delegate is created internally... Its constructor accepts 2 parameters and stores the value in some hidden private variables... There are 3 things we should always remember.... "Declaration" "Instantiation" and "Invocation" of the delegate... The method at which the delegate points should always have the same return type and the number of parameters as the method... Hope this helps you...
PLEASE MARK THE ANSWER AS ACCEPTED IF IT HELPED YOU!!! Thanks.
Shivanand ArurPosted Sep 25, 2012, 1:50 PM
Delegates act like Function Pointers... By that I mean that they basically point to a function/method and act like a method itself... Delegate is an object which are usually used to call events or methods... You can also call Multiple methods... Such Delegates are called as Multicast Delegates. Basically when you declare a delegate then a class of that Delegate is created internally... Its constructor accepts 2 parameters and stores the value in some hidden private variables... There are 3 things we should always remember.... "Declaration" "Instantiation" and "Invocation" of the delegate... The method at which the delegate points should always have the same return type and the number of parameters as the method... Hope this helps you...
PLEASE MARK THE ANSWER AS ACCEPTED IF IT HELPED YOU!!! Thanks.
Akkiraju IvaturiPosted Aug 28, 2012, 2:22 AM