C Sharp (C#) - Polymorphism and Abstract ClassesWhy can't an abstract class in C# be sealed at the same time?ABecause abstract classes are always static, sealed classes cannot be static.BBecause sealed classes cannot be inherited, but abstract classes require inheritance.CBecause sealed classes must have all methods implemented, abstract classes do not.DBecause sealed classes cannot contain abstract methods.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand sealed and abstract class rolesSealed classes prevent inheritance; abstract classes require inheritance to implement abstract members.Step 2: Analyze incompatibilityCombining sealed and abstract is contradictory because abstract classes must be inherited.Final Answer:Because sealed classes cannot be inherited, but abstract classes require inheritance. -> Option BQuick Check:Sealed blocks inheritance; abstract needs inheritance [OK]Quick Trick: Sealed blocks inheritance; abstract needs it [OK]Common Mistakes:MISTAKESThinking sealed classes can be abstractConfusing static with sealed or abstractBelieving sealed classes can have abstract methods
Master "Polymorphism and Abstract Classes" in C Sharp (C#)9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More C Sharp (C#) Quizzes Collections - List methods (Add, Remove, Find, Sort) - Quiz 10hard Exception Handling - Using statement for resource cleanup - Quiz 3easy Exception Handling - When clause in catch - Quiz 10hard File IO - Working with JSON files - Quiz 14medium Inheritance - Protected access modifier - Quiz 7medium LINQ Fundamentals - OrderBy and sorting - Quiz 2easy Polymorphism and Abstract Classes - When to use abstract vs concrete - Quiz 1easy Properties and Encapsulation - Property validation logic - Quiz 7medium Strings and StringBuilder - StringBuilder methods and performance - Quiz 10hard Strings and StringBuilder - StringBuilder and why it exists - Quiz 4medium