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 / aakanchha

Yes..!!
We can define a method as "private" ,so the method will not
be inherited.

and by 'sealed' we can prevent overriding but can not
prevent inheriting .

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need ienumerable in c#?

856


Explain the difference between abstract class and interface.

1096


what is the scope of anonymous type ?

940


Can extension methods access private members?

850


Is c# a strongly-typed language?

928


What is c sharp language?

888


How many types of delegates are there in c#?

895


What are anonymous types in c#?

844


Is unity object oriented?

858


What is difference between dictionary and list in c#?

833


What's the difference between the debug class and trace class? Documentation looks the same.

1005


Distinguish between system.string and system.text.stringbuilder classes?

878


Who is a accessibility modifier “protected internal” available to ?

954


Name the two classes are required for implementing a windows service?

981


What is the difference between Decorator and Adapter pattern?

907