How can you prevent classes to be inherited?

Answer Posted / vijay sharma

We can prevent classes to be inherited by marking the
classes as sealed.

Is This Answer Correct ?    24 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the fundamental differences between value types and reference types?

545


How do you inherit a class into other class in c#?

480


Can we inherit a private class in c#?

460


Where is the keyword void used?

546


What are destructors in C#?

835






What is the difference between int and int in c#?

489


What is difference between new and override in c#?

453


Explain the difference between // comments, /* */ comments and /// comments?

495


Define c# i/o classes? List the commonly used classes?

541


what is a destructor?

594


What is asax file in c#?

568


Why singleton class is sealed?

477


What is the difference between “constant” and “readonly” variables in c#?

497


Is c# slower than java?

475


What is the difference between abstract and abstraction?

436