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 string class in c#?
So let's say I have an application that uses myapp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name myapp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new myapp.dll?
Why do I get a "cs5001: does not have an entry point defined" error when compiling?
How do I move from one form to another in c#?
How do you escape c#?
What are the benefits of using generics in c#?
What is a streamwriter in c#?
What are object pooling and connection pooling and difference between them?
Is class reference type c#?
What is lazy loading c#?
What is the difference between first and firstordefault?
What is console used for?
What is difference between new and override in c#?
Can I get the name of a type at runtime?
Is c# lazy thread safe?