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

In which order the destructor is called for an inherited class?

0 Answers  


What is namespace c#?

0 Answers  


What is a multicast delegate in c#?

0 Answers  


What are the two kinds of properties?

10 Answers   Wipro,


Is php easier than c#?

0 Answers  






Why do we use constructors in c#?

0 Answers  


Explain the difference between the system.array.copyto() and system.array.clone()?

0 Answers  


why C#.net doesnot support prcedures and why it supports structs,functions

1 Answers  


What is the purpose of static?

0 Answers  


What Is The Difference Between ViewState and SessionState?

1 Answers   Fiserv,


Does c# support properties of array types?

0 Answers  


What is the difference between static and private constructor?

0 Answers  


Categories