How to call a function when a class implements 2 interfaces and function is present in both interfaces?

Answers were Sorted based on User's Feedback



How to call a function when a class implements 2 interfaces and function is present in both interfac..

Answer / maruthi

interface name . function name

Is This Answer Correct ?    10 Yes 1 No

How to call a function when a class implements 2 interfaces and function is present in both interfac..

Answer / mahesh babu ummaneni

we have two interfaces inclass thet two interfaces having same method name the time wecan call based on interface

example
interface1
{
add()
}
interface2
{
add()
sub()
}
class classname:interface1,interface2
{
'now wewant call the method add from interface1
interface1.add()
'now we want call the method add from interface2
interface2.add()
'now we want call the method sub() from interface2
interface2.sub()
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How more than one version of an assembly can keep in same place?

0 Answers  


What is event sourcing in c#?

0 Answers  


What is c# most used for?

0 Answers  


What are the 3 types of comments in c#?

0 Answers  


What is difference between .net and c#?

0 Answers  


What is generic in c#?

0 Answers  


If we write a goto or a return statement in try and catch block will the finally block execute?

6 Answers  


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

0 Answers  


how to print invert pyramid in c#

0 Answers   ForSight,


Explain the difference between directcast and ctype.

0 Answers  


What are the 2 kinds of data type conversions in c#?

0 Answers  


What is assembly manifest?

0 Answers  


Categories