Exam 13: Working with Files

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When you place an @ in front of a string,the string becomes a(n)____.

(Multiple Choice)
4.9/5
(99)

The StreamWriter method(s)that clears all buffers for the current writer and causes any buffered data to be written to the underlying stream is ____.

(Multiple Choice)
4.8/5
(80)

With Visual Studio when you create a file (or attempt to access one),if a path is not specified with the filename,the Apps\Debug subdirectory of the current project is used.

(True/False)
5.0/5
(83)

The constructor for the StreamWriter can include additional arguments indicating whether the file should be appended to or overwritten if it already exists.

(True/False)
4.9/5
(90)

Which exception is thrown when an attempt is made to access a file that does not exist?

(Multiple Choice)
4.7/5
(80)

StreamReader inFile = new StreamReader("name.txt"); while ((inValue = inFile.ReadLine()) != null) -Which of the following is an abstract class that cannot be instantiated?

(Multiple Choice)
4.8/5
(99)

No exception is thrown if you attempt to close or open a file that does not exist.

(True/False)
4.9/5
(89)

Which of the following class belongs to the System.IO namespace?

(Multiple Choice)
4.8/5
(80)

The StreamReader class extends the ____ class.

(Multiple Choice)
4.9/5
(86)

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?

(Multiple Choice)
4.8/5
(77)

One of the static methods of the File class is ____________.Prior to writing program statements that access data in a file,you should always check to make sure the file is available by invoking this method.

(Short Answer)
4.9/5
(82)

StreamWriter outputFile = new StreamWriter("someOutputFileName"); StreamReader inputFile = new StreamReader("someInputFileName"); -The identifier that can be referenced in a WriteLine( )method with the declaration above is ____.

(Multiple Choice)
4.8/5
(69)

The Execution version of an application contains no debugging information and is considered an optimized solution.

(True/False)
4.9/5
(97)

In order to remove a StreamWriter object named writer,which is associated with a file in the project directory called "test.dta",you would write ____.

(Multiple Choice)
4.9/5
(98)

The ____________ class provides static methods that aid in creating and moving through folders and subdirectories.

(Short Answer)
4.8/5
(80)

The ____ class has implementations for Write( )and WriteLine( )methods similar to the Console class methods.

(Multiple Choice)
4.7/5
(81)

The abstract classes of Stream,TextWriter,and TextReader are defined for dealing with files in the ____ namespace.

(Multiple Choice)
4.8/5
(79)

The GetAttributes( )method of the File class returns a FileAttribute,like Archive,when it invoked.

(True/False)
4.8/5
(82)

StreamWriter outputFile = new StreamWriter("someOutputFileName"); StreamReader inputFile = new StreamReader("someInputFileName"); -If an invalid path is included with the constructor for a StreamWriter object,____.

(Multiple Choice)
4.7/5
(77)

The StreamReader class is used to create text files.

(True/False)
4.8/5
(81)
Showing 21 - 40 of 75
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)