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's the c# syntax to catch any possible exception?

560


Explain code compilation in c#.

609


Is c# different than c++?

595


Is is possible to force garbage collector to run?

599


Can you have parameters for static constructors?

606






How do you serialize in c#?

548


What is the difference between final finally and finalize in c#?

547


What is difference between variable and property in c#?

511


Why do we override in c#?

558


What is master page in asp net c#?

564


Is vs as c#?

596


What is a clr (common language runtime)?

567


What is difference between il and dll ?

613


What is the use of getcommandlineargs() method in c#.net?

609


What does == mean in c sharp?

600