ASP.NET
Programming and Technical
What is Delegation in .NET?
Read Solution (Total 3)
-
- delegates are type safe objects which are used to hold reference of one or more methods in c#.net.
example
public delegate int Delegatmethod(int a,int b);
public class Sampleclass
{
public int Add(int x, int y)
{
return x + y;
}
public int Sub(int x, int y)
{
return x + y;
}
} - 10 years agoHelpfull: Yes(0) No(0)
- Delegation is a type of function pointer..which hold the address of specified function.
- 10 years agoHelpfull: Yes(0) No(0)
- delegates are the refrence to methods
suppose u want to perform something on click of a button then u can use eventhandler delegate to refer it to some method in which the working to be performed on button click is written - 10 years agoHelpfull: Yes(0) No(0)
ASP.NET Other Question