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 to prevent a class from being inherited in c#.net?

0 Answers  


What is a datacontract?

0 Answers  


How many types of interface are there in c#?

0 Answers  


What is assembly c#?

0 Answers  


the c# keyword .int. Maps to which .net type?

0 Answers   Siebel Systems,


int a = '3' + '4'; char n = (char)a; What will be answer of n?

4 Answers  


What does do in c#?

0 Answers  


Describe two uses of the “using” statement during the operation of c#?

0 Answers  


What does typeof return c#?

0 Answers  


What is the advantage of constructor in c#?

0 Answers  


What do you know about WM_CHAR message?

0 Answers   C DAC,


What is system predicate?

0 Answers  


Categories