c#異常處理
The exception occurs at the time of compilation
The exception occurs during program loading
The exception occurs during JIT compilation
The exception occurs during program execution
Correct answer: 4
The exception occurs during program execution
In the above statements, the 4th statement is correct about exceptions.
編譯時發生異常
程序加載期間發生異常
JIT編譯期間發生異常
程序執行期間發生異常
正確答案:4
程序執行期間發生異常
在上面的語句中,第四條關于異常的說明是正確的。
Common Language Runtime
Operating System
C# compiler
Linker
Correct answer: 1
Common Language Runtime
In the .NET framework, CLR is responsible for uncaught exceptions.
通用語言運行時
操作系統
C#編譯器
連接器
正確答案:1
通用語言運行時
在.NET框架中,CLR負責未捕獲的異常。
try
catch
errorcode
finally
Correct answer: 3
errorcode
In the .NET framework, "errorcode" is not useful to handle an exception.
嘗試
抓住
錯誤代碼
最后
正確答案:3
錯誤代碼
在.NET框架中,“錯誤代碼”對于處理異常沒有用。
The try block is used to handle all types of exceptions and avoid program crashes
We need to write code that can generate an exception inside the try block
The try block executes completely whether an exception occurs or not
The try block is used to catch exception generated at runtime
Correct answer: 2
We need to write code that can generate an exception inside the try block
In the given statements, the 2nd statement is correct about the try block.
try塊用于處理所有類型的異常并避免程序崩潰
我們需要編寫可以在try塊內生成異常的代碼
無論是否發生異常,try塊都會完全執行
try塊用于捕獲運行時生成的異常
正確答案:2
我們需要編寫可以在try塊內生成異常的代碼
在給定的語句中,第二條語句關于try塊是正確的。
Yes
No
Correct answer: 1
Yes
Yes, we can use multiple catch blocks associated with the try block.
是
沒有
正確答案:1
是
是的,我們可以使用與try塊關聯的多個catch塊。
翻譯自: https://www.includehelp.com/dot-net/csharp-exception-handling-aptitude-questions-and-answers-2.aspx
c#異常處理