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

What is the extension of c# file?

0 Answers  


What is the use of partial methods?

0 Answers  


If a class is having 4 variables namely type double,type integer,type string,type decimal. If we create an instance of that class those variables which gets into this instance are value types or reference types?

4 Answers   Kanbay,


What is whitespace in c#?

0 Answers  


What are the collection classes ?

2 Answers   Digital GlobalSoft,






How many digits are in an integer?

0 Answers  


What is array class in c#?

0 Answers  


What is the base class in .net from which all the classes are derived from?

0 Answers  


List the fundamental oop concepts?

0 Answers  


What is cache memory in c#?

0 Answers  


What is difference between managed and unmanaged code?

0 Answers   SwanSoft Technologies,


What is class method?

0 Answers  


Categories