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
Explain 'structure padding'?
write a program to find the biggest palindrome in the given string
How does the clr work?
Describe the types of comments in c#?
Which compiler switch creates an xml file from xml comments in the files in an assembly?
What is xml document how do you open it?
How do I do implement a trace?
What is for loop in c#?
What are circular references?
What is the difference between a variable and a literal?
Why singleton class is sealed?
Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?
What is token in c#?
What is generic method in c#?
What is default parameter in c#?