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

what is the syntax to inherit from a class in c#?

990


Can abstract class have parameterized constructor?

906


What is difference between yielding and sleeping?

867


Is is possible to force garbage collector to run?

985


What is #region in c#?

920


What is singleordefault c#?

887


What is virtual in c#?

875


What are the 2 broad classifications of fields in c#?

908


What are value types in c#?

880


What is function c#?

880


What is Delegate and what is it used for ?

1008


Is int a class in c#?

957


When do you generally use a class over a struct?

949


What is a Managed Code??

1004


what is .NET framework architecture ??

1996