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 Happens In Memory When You Box And Unbox A Value-type?

921


What are boxing and unboxing?

968


Why delegate is used in c#?

972


Is datetime a value type in c#?

930


What is the main method in c#?

1152


What is the use of ienumerable?

928


Why do we use struct in c#?

1011


What is the use of console?

945


What is the difference between an implicit conversion and an explicit conversion?

1037


What is the difference between a class and an object c#?

1038


What is asynchronous one-way calls?

1027


Explain the difference between object type and dynamic type variables in c#?

994


Why do we need indexer in c#?

1059


What is the benefit of interface in c#?

1004


can you declare an override method to be static if the original method is not static?

1065