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 strongly typed view?
Why do we need nullable types in c#?
What is a delegate how is it type safe?
Do while loops yes or no c#?
What are reflections in c#?
Illustrate the differences between the system.array.copyto() and system.array.clone()?
What do you mean by casting a data type?
how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge
What’s a strong name?
How do I create a multi language, multi file assembly?
What is better C# or VB.NET?
What are Indexers in C#?
How can you write a class to restrict that only one object of this class can be created (Singleton class)?
Is string a data type in c#?
What are the types of methods in c#?