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 |
explain DIFFERENCE BETWEEN CLASS AND MODULE?
Define assert() method? How does it work?
Define thread? Explain about multithreading?
What is parsing?
What does question mark mean in c#?
What is the components of window?
How many types of constructors are there?
How do you determine whether a string represents a numeric value?
State the top.NET class that everything is derived from?
What is string programming language?
Is string primitive?
What are extensions in c#?