Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Writing a catch clause without including the parentheses and an argument list su

ID: 3765754 • Letter: W

Question

Writing a catch clause without including the parentheses and an argument list such as catch { }: Select one: a. generates a syntax error b. requires a finally clause c. has the same effect as catch (System.Exception) { } d. throws an exception e. none of the above

A Just-In- Time Debugging window is displayed when a(an): Select one: a. unhandled exception is caught b. unhandled exception is thrown c. handled exception is caught d. application is executed e. handled exception is thrown

The primary difference between using Step Into and Step Over is: Select one: a. Step Into executes only the call itself, then halts at the first line of code. b. Minimal. They provide the same functionality. c. Step Over executes only the call itself, then halts at the first line of code. d. Step Over is used when you want to bypass or not execute a function. e. Step Over steps into the most deeply nested function.

What type of exception would be thrown if a program statement attempted to access location 0 in an array defined to hold 20 elements? Select one: a. System.FormatException b. ystem.lnvalid.CastException c. System.NullReferenceException d. System.lndexOutOfRangeException e. none of the above

What type of exception would be thrown if the following arithmetic were performed? double aValue = 0; double bValue = 0; int result = (int) aValue / (int) bValue; Select one: a. System.FormatException b. System.lnvalid.CastException c. System.ArgumentException d. System.DivideByZeroException e. none of the above

To avoid an exception with files, you can use a try ... catch block and include which exception class in your catch clause? Select one: a. File.ExistsException b. IOException c. FileException d. ExceptionFile e. none of the above

Explanation / Answer

Writing a catch clause without including the parentheses and an argument list such as catch { }:

Select one:

a. generates a syntax error

A Just-In- Time Debugging window is displayed when a(an):

Select one:

b. unhandled exception is thrown

The primary difference between using Step Into and Step Over is:

Select one:

e. Step Over steps into the most deeply nested function.

What type of exception would be thrown if a program statement attempted to access location 0 in an array defined to hold 20 elements?

Select one:

d. System.lndexOutOfRangeException

What type of exception would be thrown if the following arithmetic were performed? double aValue = 0; double bValue = 0; int result = (int) aValue / (int) bValue;

Select one:

d. System.DivideByZeroException

To avoid an exception with files, you can use a try ... catch block and include which exception class in your catch clause?

Select one:

a. File.Exists Exception