Which of the following using statements is equivalent to the preceding code segment

```
{
var exampleObject = new ExampleClass();
try
{
exampleObject.SomeMethod();
}
finally
{
if (exampleObject != null)
{
exampleObject.Dispose();
}
}
}
```

try using (var exampleObject = new ExampleClass())
{
exampleObject.SomeMethod(); // do something with exampleObject
exampleObject.Dispose();
}

b)
```
using (var exampleObject = new ExampleClass())
{
exampleObject.SomeMethod(); // do something with exampleObject
}
```

Computer Science & Information Technology

You might also like to view...

Existing conditional formatting rules can be edited

Indicate whether the statement is true or false.

Computer Science & Information Technology

Which of the following is NOT a precondition for an array that is to be searched by a recursive binary search algorithm? (first is the index of the first item in the array, last is the index of the last item in the array, and SIZE is size of the array)

a. SIZE <= first b. 0 <= first c. last <= SIZE – 1 d. anArray[first] <= anArray[first + 1] <= … <= anArray[last]

Computer Science & Information Technology