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?

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

How can I make sure my c# classes will interoperate with other .net languages?

1012


What is difference between ilist and list in c#?

971


How do I do implement a assert?

965


Why it's said that writing into .NET Application Configuration Files is a Bad Idea?

970


explain the features of static/shared classes.

948


When To use HashTable In C#

1024


How to find type of variable?

981


What is console writeline in c#?

882


How can we sort an array in c#?

916


What is the difference between ienumerable and iqueryable?

967


How do you inherit a class into other class in c#?

919


What is before string in c#?

928


Can an interface extend a class c#?

960


Is it not possible to store a boolean value as a variable?

857


How is a strongly-named assembly different from one that isn’t strongly-named?

1055