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
Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana
What are properties in C#?
How to properly clean up excel interop objects?
How many types of namespaces available in version4?
Does the system.exception class have any cool features?
When a Static Constructor is called in a Class?
You are creating a custom usercontrol, some of the newly created properties are shown in the properties window. How you can hide a new property named theme from the properties window?
What are types in c#?
Explain copy constructor?
What is interface inheritance in c#?
What are object pooling and connection pooling and difference between them?
Explain the use of virtual, sealed, override, and abstract method?
What is view state c#?
Is array reference type in c#?
What is the diff between System.String and System.Text.StringBuilder classes?