What happens when you mark a class as sealed?

Senior C#

Answer

A sealed class cannot be inherited. It prevents further extension and allows the compiler to optimize method calls.

It is commonly used to avoid misuse or unintended inheritance.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice