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...

interface a
{
Method1()
Method2()
}
class b: a
{
override Method1()
override Method2()
}

what will happen & why?

Answer Posted / nithya

It will through the error because
in interface,the methods should have return type for them.
And we can create only implementation for the methods
available in interface. We cannt override it.

And Virtual/Abstarct or not a valid items in interface.

We must implement the methods available in interface.

interface a
{
void Method1();
void Method2();
}
class b: a
{
public void Method1();
public void Method2();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stringbuilder c#?

958


Can You Prevent Your Class From Being Inherited By Another Class?

945


Do loops c#?

889


Is unboxing an implicit conversion?

1029


Explain About Web.config

975


What is difference between for and foreach in c#?

978


Do loops in c#?

897


What is strong name assembly?

872


What are the 3 different types of arrays?

1031


Can property be private in c#?

884


What is generic and non generic collections in c#?

833


What is the advantage of constructor in c#?

907


Why is c# better than java?

1052


What is connection pooling in ado.net?

941


What do you mean by default constructor?

1098