Answer Posted / venkat2050
delegate is a wrapper we can call any method at runtime to
call delegate by calling the keyword del
using system;
namespace sample prog
{
public delegate double(doublex,doubley);
class math
{
public double add(doublex,doubley);
{
returnx+y;
}
}
class sample
{
svm()
{
sample prog.Mathm=new sampleprog.math();
deld=new del(m.add);
c.w(d(48.97,27.29));
d=new del(m.sub);
c.w(d(29.29,7.92));
c.r
}
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
what is the meaning of Object lifetime in OOPS
Can you access a hidden base class method in the derived class?
Can you have an array of arrays?
Can datetime be null c#?
What is difference between property and variable in c#?
What are the uses of namespaces?
What is sorting in c#?
What is anonymous methods in c#?
What is array and its types in c#?
What is the adv of using System.Text.StringBuilder over System.String?
How can you force derived classes to provide new method implementations for virtual methods?
Does c# support properties of array types?
How do you inherit a class into other class in c#?
What is generic types in c#?
Explain the process of inheriting a class into another class?