Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

How many types of variables are there in c#?

0 Answers  


How to add controls dynamically to the form using c#.net.

0 Answers  


What is a thread? What is multithreading?

0 Answers  


Is everything an object c#?

0 Answers  


What is difference between array and list in c#?

0 Answers  


Explain the difference between a sub and a function?

1 Answers   Wipro,


How do you create multiple inheritance in C#?

5 Answers   Infosys, KenIndia, Microsoft,


Explain what is the smallest unit of execution in .net?

0 Answers  


Perfect Example Of While And Do-While Loop In C#.Net ?

0 Answers   Wipro,


What is console writeline in c#?

0 Answers  


Where are all .NET Collection classes located ?

8 Answers   TCS,


What is the difference between array.find method and arraylist.find method?

1 Answers   Mphasis,


Categories