what are delegates? How you used then in your project?

Answer Posted / lavanya

Delegates are pointers to functions
we pass the address of a method along with the
parameters that we want call

ex:
public delegate void delg1(string s)

we call this delg1 as
del=delg1(h1);
del("hello")

here h1 is a method

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why delegate is type safe?

2778


What is arraylist class in c#?

753


What are the return types in c#?

705


What is the use of protected in c#?

692


Define thread?

753


Enlist all the components of an ado.net framework?

649


What is double c#?

718


How do I open the console window?

771


Can we inherit partial class in c#?

666


How do generics work in c#?

669


Is c# pass by reference?

686


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

745


What is datatable in c#?

658


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

720


What is a byte in c#?

733