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

Why can?t you specify the accessibility modifier for
methods inside the interface?

Answer Posted / karans

All members of an interface is marked as public because :
1) If Private :- The members ca not be implemented into
child class (as private members are derived into child
class).
2). If Protected :- The members can not be accessed by
instance of the class implementing members of that
interface (as protected members become private into
inherited class) even the members will not be inherited
into other child classes of class implementing interface.
c). If Public :- The members can be implemented into
child classes and can be accessed by instances of that
class as well as can be inherited into child class of that
class.

So All the members of Interface are bydefault considered
as PUBLIC.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is parse method in c#?

895


Does c# support const methods, properties, or events?

949


What are the different types of assemblies available and their purpose?

904


What is dynamic object in c#?

913


What is the use of ispostback in c#?

859


In object oriented programming, how would you describe encapsulation in c#?

942


Why we use oops in c#?

967


How can i Spawn a Thread

891


Can we have two main methods in c#?

951


What language is arduino?

976


What is a ienumerator?

911


What debugging tools come with the .NET ssSDK?

1227


What is default access modifier for class in c#?

1006


How do I create a multi language, multi file assembly?

1038


1. Describe page life cycle?

2097