Posts

Showing posts with the label Delegate

Delegates in C#

Delegates – it’s a type that holds the reference of method in an object. It’s also called type safe (It ensure that operation is working on right kind of data) function pointer. Adv –    Encapsulating the method call from caller                 Effective use of delegate improve the performance                 Use to call method asynchronously.                 Declare Delegate ->Public Delegate int delegate_name(Param optional)                 Multicast Delegate – holds the reference of more than one method. Must contain the methods return void. How to use                 Single Delegate ...