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

is it possible to inherit a class but methods declared in
the class should not be inheritable i possible how?

Answer Posted / vishal

That's Correct.
Using private keyword in the method signature is a way of
preventing inheritance of that method in child class.

Please note that using "sealed" keyword in method signature
only prevents overriding of the method in child class, but
the method is still inheritable in the child class.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When can a derived class override a base class member?

855


Can you explicitly call a destructor?

885


What is a hash table in c#?

947


Why abstract class can not be instantiated?

826


Define a strong name in .net?

949


What are extender provider components?

849


What are verbatim strings in c#?

869


What is the use of console application in c#?

874


What is an iqueryable in c#?

873


What is concrete class in c# with example?

912


When Should You Call The Garbage Collector In .net?

995


If I want to override a method one of class A and in class b then how do you declare?

1231


What is an extension method in c#?

945


Why are strings immutable in c#?

862


Why References are stored on heap and variables on stack?

901