Câu hỏi phỏng vấn C#
Câu hỏi

What is the difference between System.Application...

Câu trả lời

The main differences between System.ApplicationException and System.SystemException in C# are:

  1. Derivation: System.SystemException is a base class for all exceptions generated by the .NET runtime, while System.ApplicationException is a base class for exceptions generated by application code[1][2][3].

  2. Occurrence: System.SystemException is thrown when a non-recoverable, fatal error occurs, such as a database crash or index out-of-bounds error. System.ApplicationException is thrown when a recoverable error occurs, such as invalid input data or an arithmetic exception[2][3][4].

  3. Handling: System.SystemException is not meant to be handled by application code, as the errors are unrecoverable. System.ApplicationException is designed to be handled using try-catch blocks in application code[1][2][3].

  4. Customization: Developers can create custom exception classes derived from System.ApplicationException to represent application-specific errors. System.SystemException is ...

senior

senior

Gợi ý câu hỏi phỏng vấn

senior

What is the best practice to have best performance using Lazy objects?

middle

Explain the difference between Task and Thread in .NET

junior

How is Exception Handling implemented in C#?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào