Which of the following statements is false?
a) Typically resource-release code should be placed in a finally block to ensure that a
resource is released, regardless of whether there were exceptions when the resource was
used in the corresponding try block.
b) The using statement simplifies writing code in which you obtain a resource, use the
resource in a try block and release the resource in a corresponding finally block.
c) A file-processing app could process a file with a using statement to ensure that the file
is closed properly when it’s no longer needed.
d) The resource in a using statement must be an object that implements the IDiscardable
interface.
d) The resource in a using statement must be an object that implements the
IDiscardable interface. Actually, the object must implement the IDisposable
interface.
You might also like to view...
If you want to find the number of days between a start and end date, use the Now function
Indicate whether the statement is true or false
What will be the results after the following code is executed?
``` int[] array1 = new int[25]; ... // Code that will put values in array1 int value = array1[0]; for (int a = 1; a < array1.length; a++) { if (array1[a] < value) value = array1[a]; } ``` a. value contains the highest value in array1 b. value contains the lowest value in array1 c. value contains the sum of all the values in array1 d. value contains the average of all the values in array1