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 |
What is the purpose of the integer parse method the decimal parse method?
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.
Is enum a class c#?
List out two different types of errors in c#?
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?
How to sign an assembly with strong name?
What are the benefits of using generics?
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?
What is the meaning of 0 in c#?
Explain the difference between Metadata and Manifest
What is callback in c#?
Why it's said that writing into .NET Application Configuration Files is a Bad Idea?