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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

List the difference between the virtual method and the abstract method?

671


What is double c#?

720


What is the advantage of singleton class?

686


Can You Prevent Your Class From Being Inherited By Another Class?

727


What is system predicate?

627


What are the different types of constructors?

700


How do you determine whether a string represents a numeric value?

715


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

681


What is difference between internal and protected internal in c#?

685


What is the namespace for datatable in c#?

710


Difference between value and reference type.

699


Why abstraction is used in c#?

680


Are cao stateful in nature?

654


What is the difference between firstordefault and singleordefault?

673


What is overloading in c#?

671