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


Please Help Members By Posting Answers For Below Questions

What is the use of return in c#?

485


Explain about Serialize and MarshalByRef?

545


How many bytes is a char c#?

480


What is called method in c#?

509


What is the implicit name of the parameter that gets passed into the class set method?

483






Can we customize the serialization process?

521


Do void methods have parameters?

485


What is the difference between array and arraylist c#?

455


What is the difference between writeline and write in c#?

422


Can I use parseint?

473


Is static thread safe?

482


In .Net, what is an assembly? Also explain the type of assembly.

512


What is boxing & unboxing?

558


Is xml tags are case sensitive?

475


Explain how do you debug an asp.net web application?

477