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 the meaning of int parse in c#?
How does c# achieve polymorphism?
What is string method in c#?
Explain the feature of c# language?
What is the difference between null and string empty in c#?
What is c# console application?
What is meant by generics in c#?
What is a partial class in c#?
Which is more efficient for loop or while loop?
What does mean c#?
What is difference between list and dictionary in c#?
Why References are stored on heap and variables on stack?
Explain About friend and Protected friend
Can we override main method in c#?
What are sessions in c#?