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
List the difference between the virtual method and the abstract method?
What is double c#?
What is the advantage of singleton class?
Can You Prevent Your Class From Being Inherited By Another Class?
What is system predicate?
What are the different types of constructors?
How do you determine whether a string represents a numeric value?
What are the 2 kinds of data type conversions in c#?
What is difference between internal and protected internal in c#?
What is the namespace for datatable in c#?
Difference between value and reference type.
Why abstraction is used in c#?
Are cao stateful in nature?
What is the difference between firstordefault and singleordefault?
What is overloading in c#?