what is Anonymous Method.? and
What is shadowing?
Answers were Sorted based on User's Feedback
Answer / guest
methods with no names are called as annonymous methods
when two or more programing elements eg.a method has same
name that of other then one method is hiden and has no
reference this is known as shadowing
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / 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 |
what is the difference between c-sharp and vb.net?What kind of security or advances we find in both languages?
How do I create a multilanguage, single-file assembly?
Name some string escape sequences in c#.
Are constructors inherited c#?
Are private members inherited in c#?
How do you encapsulate in c#?
Where do we use static class in c#?
What are strin concatation methods in c#?
1 Answers Phoenix Technologies,
Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.
What does it meant to say “the canonical” form of XML ?
what is the difference between arraylist and hash table using a simple program?
3 Answers CGI, Polaris, SunGard,
What is lazy keyword in c#?