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
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 |
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 |
Answer / srinivas.r
we need to implement methods of interfaces explictly i.e
interfaceName.methodName
Is This Answer Correct ? | 2 Yes | 0 No |
How does aspect oriented programming work?
What is the difference between icomparer and icomparable in c#?
what is the purpose of using statement in c#
What?s the difference between // comments, /* */ comments and /// comments?
Can we customize the serialization process?
What do you mean by expression tree?
What is routing in c#?
Does unity use c++ or c#?
What is sqldatareader c#?
Is array reference type / value type ?
6 Answers Accenture, BirlaSoft,
Why abstract class can not be instantiated?
Can you change the value of a constant filed after its declaration?