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
What is bit in c#?
What is a method signature in c#?
What is the difference between arraylist and list in c#?
How Global.asax is used ?
Is c# an array?
What to implement on my class Finalize or IDisposable
Are all methods virtual in c#?
What is the benefit of using interface in c#?
What is the advantage of constructor?
Can you store strings in arrays?
Which of these statements correctly declares a two-dimensional array in c#?
What does the keyword “virtual†declare for a method or property?
How to implement an object pool in c#.net.
What is a property in c#?
What's the difference between abstraction and encapsulation?