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 / umesh

Yes, just leave the class public and make the method sealed.

Is This Answer Correct ?    17 Yes 1 No

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

Answer / anubhav gupta

We can use shadowing concept.
For shadowing use New keyword in derived class method.
Through this we can prevent the method from being over
ridden.

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More C Sharp Interview Questions

can we create an empty interface with no definitions? If so, how it should be called in the class?

3 Answers   IBM,


what is the difference between the debug class and trace class?

0 Answers   Rolta,


List some of the common data providers for ado.net framework?

0 Answers  


Ho we can see assembly information?

0 Answers  


What is the difference between readkey and readline in c#?

0 Answers  


How does substring work in c#?

0 Answers  


What do you mean by sealed classes and static classes?

0 Answers   Accenture,


Example of value type and refarnce type

4 Answers   Synechron,


Difference between dispose and destructor?

3 Answers   TCS,


What is dapper in c#?

0 Answers  


List down the differences between “dispose” and “finalize” methods in c#.

0 Answers  


How can you sort the elements of the array in descending order?

4 Answers  


Categories