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 |
Is array reference type / value type ?
6 Answers Accenture, BirlaSoft,
Define sealed classes in c#?
What is namespace in oops?
What is the main purpose of delegates in c#?
Why do we need structs in c#?
Can the accessibility of a type member be greater than the accessibility of its containing type?
What is generic delegates in c#?
Can I call a virtual method from a constructor/destructor?
What does the keyword virtual mean in the method definition?
What is native image generator (ngen.exe)?
What is a hashset c#?
What is void in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)