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
Write a short note on interface?
Why do we need private constructor in c#?
What is ioc containers c#?
What is ado c#?
What is a dbml?
What do u meant by "SBI" of an object?
What is instantiating a class?
what are the different ways a method can be overloaded?
What is namespace give the example?
List the difference between interface and abstract class?
How do you serialize an object?
Which program construct must return a value?
Explain metadata in c#.
What is deferred execution?
Is python easier than c#?