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


Please Help Members By Posting Answers For Below Questions

What is the meaning of int parse in c#?

507


How does c# achieve polymorphism?

473


What is string method in c#?

498


Explain the feature of c# language?

504


What is the difference between null and string empty in c#?

464






What is c# console application?

486


What is meant by generics in c#?

500


What is a partial class in c#?

489


Which is more efficient for loop or while loop?

471


What does mean c#?

532


What is difference between list and dictionary in c#?

464


Why References are stored on heap and variables on stack?

509


Explain About friend and Protected friend

523


Can we override main method in c#?

484


What are sessions in c#?

496