what is Anonymous Method.? and
What is shadowing?
Answer Posted / kavitha
Anonymous method - those method which does have any name and
type.. while declaration but its type is defined dynamically
depending upon the type the method
for eg-
int n = 0;
Del d = delegate() { System.Console.WriteLine("Copy #:{0}",
++n); };
shadowing - if two methods have the same name and
signature. we can hide the scope of one method to access
another method
using shadow keyword .
for eg - we can use tostring() method in our program by
Public Class Class2
Inherits Class1
Shadows Sub MethodA()
MsgBox(“Method A Class2 called”)
End Sub
Overrides Sub MethodB()
MsgBox(“Method B Class2 called”)
End Sub
End Class
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is a clr (common language runtime)?
In which way you can convert a value-type to a reference-type?
What is dependency in software?
Is c# substring zero based?
what are the Disadvantages of vb
What is virtual class in C#?
What are some of the commonly used commands in sqlcommand?
What basic steps are needed to display a simple report in crystal?
What is the use of convert toint32 in c#?
What is int32?
What is the function of the not null constraint?
Define acid rule of thumb for transactions in c#.
How do I use the 'using' keyword with multiple objects?
What are the properties of c#?
What is a must for multitasking