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
Why is ienumerable used?
What is icomparable in c#?
What is inumerable?
What is c sharp used for?
What is xaml in c#?
Difference between Value type & reference types ? and give the example in .Net?
Explain states of a thread in c#?
What is the major difference between a custom control and user control?
Is clr a compiler?
Explain about CTS?
How do I unload an assembly?
Why would you use untrusted verification?
What is immutable in C#?
What is satellite assembly? And steps to create satellite assembly?
Can we have only “try” block without “catch” block in c#?