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 property c#?

905


Is null c# operator?

918


How to find out that the code is written as managed or un-managed code?

1052


Can you have an array of arrays?

936


What is a partial class in c#?

983


What do you mean by string objects are immutable?

964


Explain the difference between proc. Sent by val and by sub?

895


Could you explain the difference between func vs action vs predicate?

826


Does c# support parameterized properties?

911


What is Dependency of Injection?

911


Can an abstract class have a constructor c#?

876


List the fundamental oop concepts?

864


What is the symbol used for in c#?

910


Can you explain template pattern?

961


What is the compiler of c#?

913