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

Can you prevent a class from overriding?

Answer Posted / techy_unknown

Hi,

I think the question itself is illogical.

The term "overriding" is ONLY and ONLY associated with
methods/properties not to the class.

So, if the question is put a like, "How to prevent methods
not to be overriden?" then the answer is: "Make them non-
virtual."

And if the question is put a like, "How to prevent the
inheritance for a specific class?" then the answer
is, "Make the calss sealed."

I really hope that the reply makes sense here.

Is This Answer Correct ?    38 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use static class in c#?

854


What is the purpose of abstract class in c#?

868


What is Implicit conversion in C#?

1045


What is a clr (common language runtime)?

844


What is the difference between structure and class in c#?

895


How does aspect oriented programming work?

903


how dot net compiled code will become platform independent?

892


Explain the Abstract class in c#.net

945


Can a string be null c#?

842


Give an example to show for hiding base class methods?

804


What is xor operator in c#?

892


Define satellite assembly in c#?

831


Which string method is used for concatenation of two strings in c#?

949


Illustrate serialization?

896


Why do we use stringbuilder in c#?

873