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
Constructor to an arbitrary base constructor?
Why reflection is used in c#?
How do I port "synchronized" functions from visual j++ to c#?
Explain async and await?
What do you mean by default constructor?
Why do we use struct in c#?
What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default
What are the concepts of dispose method?
What is boxing & unboxing?
What are the different types of literals in c#?
What is using keyword in C#?
What is msil, and why should developers need an appreciation of it if at all?
What is singleordefault?
Which are the access modifiers available in c#?
what is a static constructor?