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

Why do we use lambda expression in c#?

989


How to declare a property in a class?

1046


Which of these string definitions will prevent escaping on backslashes in c#?

1049


Why would you use a class property in c#?

970


What is the use of console readkey in c#?

993


What are instance fields in c#?

1053


Can a class be protected in c#?

953


What is the symbol used for in c#?

996


Is hashset ordered c#?

1013


What is c# most used for?

1016


What is the difference between finalize() and dispose()?

971


What are sessions in c#?

985


What is use of a HashTable in .NET?

1200


What is the object class in c#?

1019


What is difference between ienumerable and enumerable in c#?

984