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

Is it good to use var in c#?

1 Answers  


What is class sortedlist underneath?

1 Answers  


Can the nested class access, the containing class. Give an example?

1 Answers  


How do you generate documentation from the C# file commented properly with a command-line compiler?

1 Answers  


What is access specifier in c#?

1 Answers  


What is the difference between abstraction and encapsulation in c#?

1 Answers  


What is gui in c#?

1 Answers  


Code to run exe like mspaint,autocad etc in asp.net.

2 Answers  


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

1 Answers  


Is clr a compiler?

1 Answers  


What is difference between array and list in c#?

1 Answers  


What is master page in asp net c#?

1 Answers  


Categories