2
Reply

What are delegates in C#?

Deepak  Kamboj

Deepak Kamboj

11y
1.8k
0
Reply

    A delegate is a type that represents references to methods with a particular parameter list and return type

    • Delegate in C# is similar to a function pointer in C or C++. • Delegate is type which holds the method(s) reference in an object. It is also referred as a type safe function pointers. • Delegate allows the programmer to encapsulate a reference to a method inside a delegate object. • The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked. • An interesting and useful property of a delegate is that it does not know or care about the class of the object that it references. for similar kind of questions in c# you can refer this link c# interview questions