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 dynamic sql

2 Answers   TCS, Wipro,


What is a virtual property. Give an example?

0 Answers  


What is console based application?

0 Answers  


what is the fastest way to concatenate strings in c sharp?

4 Answers   HCL,


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

5 Answers  


what does static void Main(string[] args) in C# mean????????

5 Answers   ssinformatics,


What is xor operation?

0 Answers  


Does c# support try-catch-finally blocks?

0 Answers  


How to add a readonly property in c#.net

0 Answers  


What is a .aspx file?

0 Answers  


How to create multi-dimensional array?

0 Answers   C DAC, CDAC,


How do I declare a pure virtual function in c#?

0 Answers  


Categories