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 allow class to be inherited, but prevent the method
from being over-ridden?

Answers were Sorted based on User's Feedback



Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / guest

make the method as sealed

Is This Answer Correct ?    18 Yes 2 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / sujai cn

By using NEW key word with implementation of method (which
is declared as virtual in base class) in the derived class

Is This Answer Correct ?    3 Yes 0 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / mr.f

This problem is very easy, You just declared the method
without virtual keyword. :d

Is This Answer Correct ?    5 Yes 5 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / nkm

Class can be MustInherit and method can be NotInheritable
(VB.NET Concept)

Is This Answer Correct ?    0 Yes 1 No

Can you allow class to be inherited, but prevent the method from being over-ridden?..

Answer / avijit

declare the method as protected

Is This Answer Correct ?    5 Yes 11 No

Post New Answer

More C Sharp Interview Questions

What do you mean by winforms in c#?

0 Answers  


How do you create multiple inheritance in C#?

5 Answers   Infosys, KenIndia, Microsoft,


Explain get and set accessor properties?

0 Answers  


What is the difference between var and dynamic types in c# 4.0?

0 Answers  


What are nested classes in c#?

0 Answers  


what is a constructor?

5 Answers   Amazon, Amdocs, Choice Solutions,


Does c# support properties of array types?

0 Answers  


Are c# destructors the same as c++ destructors?

0 Answers  


What is overloading in c#?

0 Answers  


Is it possible to implement an interface to a structure? Is it possible to extend a struct? Is it possible to inherit a class to struct?

9 Answers   IBM, Logica CMG, TCS,


What is the difference between an XML "Fragment" and an XML "Document." ?

1 Answers  


In a site to turn off cookies for one page which method is followed?

0 Answers   Siebel,


Categories