Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Constructor to an arbitrary base constructor?

983


Why reflection is used in c#?

940


How do I port "synchronized" functions from visual j++ to c#?

902


Explain async and await?

1849


What do you mean by default constructor?

1098


Why do we use struct in c#?

968


What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default

993


What are the concepts of dispose method?

945


What is boxing & unboxing?

1013


What are the different types of literals in c#?

1050


What is using keyword in C#?

1034


What is msil, and why should developers need an appreciation of it if at all?

1060


What is singleordefault?

903


Which are the access modifiers available in c#?

971


what is a static constructor?

1219