1) What is delegate ?
Ans) Delegate is a type which holds the method(s) reference in an object. It is also referred to as a type safe function pointer.
Using delegates we can pass methods as a parameters. To pass methods as a parameter to delegate, the signature of the method must match of the signature of the delegate.
Ans) Delegate is a type which holds the method(s) reference in an object. It is also referred to as a type safe function pointer.
Using delegates we can pass methods as a parameters. To pass methods as a parameter to delegate, the signature of the method must match of the signature of the delegate.
2) What is the syntax of the delegate?
Ans) public delegate return_type delegate_name(parameters);
3) What are the advantages of delegate?
Ans) 1. Effective use of delegate improves the performance of application
No comments:
Post a Comment