what is Anonymous Method.? and

What is shadowing?

Answers were Sorted based on User's Feedback



what is Anonymous Method.? and What is shadowing?..

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

what is Anonymous Method.? and What is shadowing?..

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

Post New Answer

More C Sharp Interview Questions

what is the difference between c-sharp and vb.net?What kind of security or advances we find in both languages?

3 Answers   DataPoint,


How do I create a multilanguage, single-file assembly?

0 Answers  


Name some string escape sequences in c#.

0 Answers  


Are constructors inherited c#?

0 Answers  


Are private members inherited in c#?

0 Answers  






How do you encapsulate in c#?

0 Answers  


Where do we use static class in c#?

0 Answers  


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.

0 Answers  


What does it meant to say “the canonical” form of XML ?

1 Answers  


what is the difference between arraylist and hash table using a simple program?

3 Answers   CGI, Polaris, SunGard,


What is lazy keyword in c#?

0 Answers  


Categories