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...

If u declare two interfaces withsame methodnmae .prototype
how can u call the particular method from class?

Answer Posted / n.v.s prasad

By using explicit interface declaration which is nothing
but (Interfacename.Methodname) but the problem is method
available to interface not for class(if you careate
instance of your class we are not able to access method
which we implemented above in our class, so method is
availble to interface only)

Note:If you want to acess method by instance of your class
we need to cast our instance to 'interface'
((instance)interfacename).methodname--->Possible
instance.methodname ---->Not possible

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of dependency injection?

920


What is a static field?

899


How will you allow a class to be inherited, but prevent the method from being over-ridden?

1026


Why should you override the tostring() method?

1051


What do you mean by a windows process in regards to memory allocation?

963


Is lazy thread safe c#?

881


If I return out of a try/finally in c#, does the code in the finally-clause run?

980


How do I declare inout arguments in c#?

939


What is delegates in c# and uses of delegates?

858


What is reference types in c#?

989


What does void do in c#?

959


Enlist the different types of classes in c#?

929


What is a bool in c#?

868


Is c# a technology?

912


What is the relation between classes and objects?

963