Qus:    What is delegate in .NET?
Nov 07, 2020 04:17 2 Answers Views: 96 RAMU

 



A delegate in .NET is similar to a function pointer in other programming languages like C or C++. A delegate allows the user to encapsulate the reference of a method in a delegate object. A delegate object can then be passed in a program, which will call the referenced method. We can even use a delegate method to create a custom event in a class.

Prev Next
Answers (2)
FRAUSKY Nov 10, 2020 04:28
Answer:   A delegate in .NET is similar to a function pointer in other programming languages like C or C++. A delegate allows the user to encapsulate the reference of a method in a delegate object. A delegate object can then be passed in a program, which will call the referenced method. We can even use a delegate method to create a custom event in a class.

PARTH Nov 11, 2020 09:01
Answer:   The delegate is a reference type data type that defines the method signature. You can define variables of delegate, just like other data type, that can refer to any method with the same signature as the delegate.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect