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

What is managed or unmanaged code?

0 Answers  


What is datetime minvalue in c#?

0 Answers  


In a single .NET DLL how many classes it contains?

0 Answers   Siebel,


What is the difference between ref & out parameters in c#?

0 Answers  


How long does a loop recorder procedure take?

0 Answers  


What statements can enclose a "continue" statement?

3 Answers   Fortech,


What are the Types of JIT and what is econo-JIT

0 Answers   TCS,


How long will it take to learn c#?

0 Answers  


Are enums static c#?

0 Answers  


What are primitive data types in c#?

0 Answers  


What is a static class in c#?

0 Answers  


What is dictionary class in c#?

0 Answers  


Categories