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

How to declare a property in a class?

1046


Explain about Threading Types.

1119


What is predicate builder?

985


Is string nullable in c#?

1008


What is data type in c# with example?

1104


What are delegates and why are they required?

1046


What is list collection in c#?

1009


How do I type a whitespace character?

1139


If a method's return type is void, can you use a return keyword in the method?

929


What is equal c#?

965


Define acid rule of thumb for transactions in c#.

940


Whats an assembly? Describe the importance of assembly?

947


What does a constructor do c#?

969


Can you have an array of arrays?

996


Is predicate a functional interface?

1006