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

Answers were Sorted based on User's Feedback



If u declare two interfaces withsame methodnmae .prototype how can u call the particular method fro..

Answer / umesh

Using Interface.Methodname

Is This Answer Correct ?    4 Yes 0 No

If u declare two interfaces withsame methodnmae .prototype how can u call the particular method fro..

Answer / diana cheriyan

Suppose IntSample1 and IntSample2 are interface,then We call
method of IntSample1 by IntSample1.Methodname

Is This Answer Correct ?    4 Yes 1 No

If u declare two interfaces withsame methodnmae .prototype how can u call the particular method fro..

Answer / 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

If u declare two interfaces withsame methodnmae .prototype how can u call the particular method fro..

Answer / srinivas.r

we need to implement methods of interfaces explictly i.e
interfaceName.methodName

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is the purpose of the integer parse method the decimal parse method?

0 Answers  


These questions were asked me in a technical interview: •If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? •How security pinholes will be handled in an application? •What things should be considered while writing a web application? •How will you do load/performance testing of web application? Which framework you will use for it? •How will you implement a cache for results which require a DB access? Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application. Your guidelines will be helpful.

0 Answers   TCS,


Is enum a class c#?

0 Answers  


List out two different types of errors in c#?

0 Answers  


If the interface in c# only contains the declaration of the methods and we need to define those methods in the class, then why we use the interface?

0 Answers   HCL,


How to sign an assembly with strong name?

0 Answers   CitiusTech,


What are the benefits of using generics?

0 Answers  


If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor?

2 Answers  


What is the meaning of 0 in c#?

0 Answers  


Explain the difference between Metadata and Manifest

0 Answers   HCL,


What is callback in c#?

0 Answers  


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

0 Answers   DELL,


Categories