Introduction to Delegate
A delegate is an object that can refer to a method. Delegate object contain references to methods that need to be invoked instead of containing actual method names.
Features of Delegate
q Methods can be passed as parameters to a delegate. In addition, a delegate can accept a block of code as a parameter. Such blocks are referred to as anonymous methods because they have no method name.
q A delegate can invoke multiple methods simultaneously. And this is known as multicasting.
q A delegate can encapsulate static methods.
No comments:
Post a Comment