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 are c# i/o classes? What are the commonly used i/o classes?

0 Answers  


What is the value which is accepted by all data types ?

0 Answers   MCN Solutions,


What is garbage collector and where should you use in .NET?

0 Answers   Siebel,


Explain About stateless and state full web service

0 Answers   Digital GlobalSoft,


Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?

0 Answers  






Can we inherit private class in c#?

0 Answers  


What is a web service in c#?

0 Answers  


Can extension methods access private members?

0 Answers  


What is field in c#?

0 Answers  


What is the difference between class and namespace?

0 Answers  


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

0 Answers   Siebel Systems,


what happens if you inherit multiple interfaces and they have conflicting method names?

0 Answers   Siebel Systems,


Categories