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 virtual in c#?
What are the different states of a thread?
Where are value types stored in c#?
While debugging a C# application can you change the value of a variable?
What are the return types in c#?
What is an interface class in c#?
What is console readkey in vb net?
Define the term immutable ?
What is the difference between continue and break statement?
What is delegate in c#?
Does c# support parameterized properties?
Explain what are the steps for creating clr trigger?
What type is string in c#?
Is std :: string null terminated?
What is difference between gridview and form view?