C# Exceptions Flashcards
Which of the following is NOT a .NET Exception class?
1. Exception
1. StackMemoryException
1. DivideByZeroException
1. OutOfMemoryException
1. InvalidOperationException
StackMemoryException
These are the valid exceptions https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/using-standard-exception-types
Which of the following statements is correct about an Exception?
1. It occurs during compilation.
2. It occurs during linking.
3. It occurs at run-time.
4. It occurs during Just-In-Time compilation.
5. It occurs during loading of the program.
It occurs at run-time
The exceptions only occur during runtime because in C# exceptions are treated as unchecked exceptions (checked during runtime. Not compile time).