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
In .NET how can you solve the DLL Hell problem?
Why do we need private constructor in c#?
What is difference between method overriding and method overloading?
Explain states of a thread in c#?
Enlist all the components of an ado.net framework?
What is the use of properties window?
What is a scope in c#?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
Why data types are important in c#?
What is an array of arrays called?
what is a constructor? What is a destructor?
What is default access modifier for class in c#?
What is string empty?
If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.
What is serialization in dot net?