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

What is bit in c#?

936


What is a method signature in c#?

890


What is the difference between arraylist and list in c#?

857


How Global.asax is used ?

1014


Is c# an array?

844


What to implement on my class Finalize or IDisposable

936


Are all methods virtual in c#?

909


What is the benefit of using interface in c#?

952


What is the advantage of constructor?

847


Can you store strings in arrays?

941


Which of these statements correctly declares a two-dimensional array in c#?

1023


What does the keyword “virtual” declare for a method or property?

912


How to implement an object pool in c#.net.

1006


What is a property in c#?

863


What's the difference between abstraction and encapsulation?

855