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
What is the purpose of dependency injection?
What is a static field?
How will you allow a class to be inherited, but prevent the method from being over-ridden?
Why should you override the tostring() method?
What do you mean by a windows process in regards to memory allocation?
Is lazy thread safe c#?
If I return out of a try/finally in c#, does the code in the finally-clause run?
How do I declare inout arguments in c#?
What is delegates in c# and uses of delegates?
What is reference types in c#?
What does void do in c#?
Enlist the different types of classes in c#?
What is a bool in c#?
Is c# a technology?
What is the relation between classes and objects?