c#异常处理_C#异常处理能力问题和解答 套装2
c#異常處理
1) There are the following statements that are given below, which is correct about an exception in C#.NET?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.
1)下面給出了以下語句,關于C#.NET中的異常正確嗎?編譯時發生異常
程序加載期間發生異常
JIT編譯期間發生異常
程序執行期間發生異常
正確答案:4
程序執行期間發生異常
在上面的語句中,第四條關于異常的說明是正確的。
2) In C#.NET, we write a program that generates a runtime error, and we did not write code to catch the exception, then which of the following will catch it?Common Language Runtime
Operating System
C# compiler
Linker
Correct answer: 1
Common Language Runtime
In the .NET framework, CLR is responsible for uncaught exceptions.
2)在C#.NET中,我們編寫了一個生成運行時錯誤的程序,而我們沒有編寫代碼來捕獲該異常,那么下列哪個將捕獲該異常?通用語言運行時
操作系統
C#編譯器
連接器
正確答案:1
通用語言運行時
在.NET框架中,CLR負責未捕獲的異常。
3) There are following options are given below, which is not useful to handle an exception in C#.Net?try
catch
errorcode
finally
Correct answer: 3
errorcode
In the .NET framework, "errorcode" is not useful to handle an exception.
3)下面給出了以下選項,這些選項對處理C#.Net中的異常沒有用嗎?嘗試
抓住
錯誤代碼
最后
正確答案:3
錯誤代碼
在.NET框架中,“錯誤代碼”對于處理異常沒有用。
4) There are following statements are given below, which is correct about try block in C#.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.
4)下面給出了以下語句,關于C#.NET中的try塊是正確的嗎?try塊用于處理所有類型的異常并避免程序崩潰
我們需要編寫可以在try塊內生成異常的代碼
無論是否發生異常,try塊都會完全執行
try塊用于捕獲運行時生成的異常
正確答案:2
我們需要編寫可以在try塊內生成異常的代碼
在給定的語句中,第二條語句關于try塊是正確的。
5) Can we use multiple catch blocks associated with try block in C#.NET?Yes
No
Correct answer: 1
Yes
Yes, we can use multiple catch blocks associated with the try block.
5)我們可以在C#.NET中使用與try塊關聯的多個catch塊嗎?是
沒有
正確答案:1
是
是的,我們可以使用與try塊關聯的多個catch塊。
? C# Exception Handling Aptitude | Set 1 C# Exception Handling Aptitude | Set 3 ? #C#異常處理能力| 設置1 C#異常處理能力| 設置3?翻譯自: https://www.includehelp.com/dot-net/csharp-exception-handling-aptitude-questions-and-answers-2.aspx
c#異常處理
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的c#异常处理_C#异常处理能力问题和解答 套装2的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: oracle中dbms_并发和由于DBM
- 下一篇: getlong_Java LocalDa