Exam 13: Working with Files

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

The ____________ method of the StreamReader class enables you to retrieve one line of text from the file.

(Short Answer)
4.9/5
(85)

If you do not specify the full path for the filename,Visual Studio uses the ____________ subdirectory of the current project.

(Short Answer)
5.0/5
(72)

To programmatically avoid having a FileNotFoundException or DirectoryNotFoundException exceptions thrown in an application,you should send the filename as an argument to Exists( )before attempting to construct an object.

(True/False)
4.8/5
(88)

Parent and Root are two key properties of which class?

(Multiple Choice)
4.8/5
(74)

In C#,when data is written to a file,it is stored in sorted order by a unique key.

(True/False)
4.8/5
(84)

The StreamReader's Peek( )method returns the next available character but does not consume it.

(True/False)
4.7/5
(87)

The StreamReader class is most often used to retrieve single characters,one character at a time,from a file.

(True/False)
4.9/5
(78)

StreamWriter outputFile = new StreamWriter("someOutputFileName"); StreamReader inputFile = new StreamReader("someInputFileName"); -Every member of the File class is static-meaning methods are called ____.

(Multiple Choice)
4.8/5
(76)

The gray section below the Form object where dialog objects are placed in Visual Studio is called the ____.

(Multiple Choice)
4.8/5
(82)

If you attempt to access a file and have an invalid path listed in the constructor,a(n)____________ exception is thrown.

(Short Answer)
4.9/5
(87)

Instead of hard coding the actual filename and file path,you could prompt the user for the name of the file using subclasses of the FileDialog class.

(True/False)
4.7/5
(74)

To invoke File's Copy( )method to make a copy of "source.txt",naming the new file "target.txt",you would write: File.Copy("source.txt","target.txt");because Copy is a static member of the File class.

(True/False)
4.8/5
(76)

Which method is used to cause the dialog boxes to open?

(Multiple Choice)
4.8/5
(83)

The ____________ class makes it easy to write data to a file because it has implementations for the Write( )and WriteLine( )methods.

(Short Answer)
4.7/5
(85)

Which method,used with the StreamWriter class,can be invoked to write characters to the stream,followed by a line terminator?

(Multiple Choice)
4.9/5
(93)

The files created using the ____________ class are readable by the computer but,unlike the files created by the StreamWriter class,you cannot simply open and read the contents of the file using Notepad.A program is needed to interpret the file contents.

(Short Answer)
4.8/5
(80)

A(n)____________ is considered a named collection of bytes having persistent or lasting storage.

(Short Answer)
4.9/5
(77)

FileInfo and DirectoryInfo classes expose only static data members.

(True/False)
4.9/5
(91)

The constructor for the StreamWriter class is overloaded to include a Boolean variable indicating whether this is the first time the file was accessed.

(True/False)
4.8/5
(78)

When writing text files,if you add true to the constructor for the Append argument,____.

(Multiple Choice)
4.8/5
(87)
Showing 41 - 60 of 75
close modal

Filters

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