Difficulty: Easy
Correct Answer: StackMemoryException
Explanation:
Introduction / Context:
The .NET Base Class Library defines many specific exception types. This question asks you to identify the option that does not correspond to an actual .NET exception class.
Given Data / Assumptions:
Concept / Approach:
There is no type named StackMemoryException in the .NET BCL. The correct type for stack exhaustion is StackOverflowException. The other listed options are real, widely used exception classes in the System namespace hierarchy.
Step-by-Step Solution:
Verification / Alternative check:
IntelliSense or reference docs show StackOverflowException as the correct class for stack exhaustion, not StackMemoryException.
Why Other Options Are Wrong:
They correspond to real exception types used by the CLR and libraries.
Common Pitfalls:
Memorizing slightly incorrect names (e.g., “StackMemory” vs. “StackOverflow”). The exact class name matters.
Final Answer:
StackMemoryException
Discussion & Comments