How can you prevent classes to be inherited?

Answer Posted / jaffer

By using Sealed keyword before class.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is different about switch statements in c#?

492


What are console applications used for?

485


What is a c sharp?

466


Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?

508


What is a template class?

485






Explain Constructor and destructor?

529


How to use delegates with events?

556


Define satellite Assembly?

557


Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?

525


What do you understand by an Implicit Variable?

526


How is lazy loading achieved?

498


What are generations and how are they used by the garbage collector?

518


Can we maintain state in webservice?

504


Is namespace a class?

496


What is inumerable?

571