Multiple Choice
StreamReader inFile = new StreamReader("name.txt") ;
while ((inValue = inFile.ReadLine() ) != null)
-With the above code segment,how could you programmatically avoid having a FileNotFoundException or DirectoryNotFoundException exception thrown?
A) invoke File.Exists( ) before the while loop
B) invoke File.Exists( ) inside the while loop
C) include a try...catch block
D) test for File.Exists( ) instead of null
Correct Answer:

Verified
Correct Answer:
Verified
Q4: Which exception is thrown when an attempt
Q7: One of the static methods of the
Q28: In order to remove a StreamWriter object
Q32: StreamWriter outputFile = new StreamWriter("someOutputFileName");<br>StreamReader inputFile =
Q35: Which of the following class belongs to
Q36: The _ class provides static methods that aid
Q38: No exception is thrown if you attempt
Q42: The Execution version of an application contains
Q62: Which of the following is an abstract
Q74: The StreamReader class extends the _ class.<br>A)