Exam 13: Working With Files

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

Streams are also used in C# to read and write data to binary files.

(True/False)
4.9/5
(74)

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

(True/False)
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.8/5
(83)

Assume that an object of the DirectoryInfo is instantiated using the identifier dirListing. How could you retrieve the names of all files stored in dirListing that have a file extension of .cs?

(Multiple Choice)
4.8/5
(79)

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

(True/False)
4.8/5
(68)

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

(Short Answer)
4.9/5
(78)

StreamReader inFile = new StreamReader("name.txt"); While ((inValue = inFile.ReadLine()) != null) Using the above segment of code, inValue would be defined as what type of data? ​

(Multiple Choice)
4.8/5
(84)

Objects of streams can be wrapped with ____ objects to improve the speed and performance of file-handling operations.

(Multiple Choice)
4.8/5
(73)

If you use Visual Studio and include a reference to the System.IO namespace, IntelliSense provides helpful information while you are developing your file application.

(True/False)
4.8/5
(78)

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
(76)

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

(Short Answer)
4.8/5
(79)

The StreamReader class is used to create text files.

(True/False)
4.9/5
(80)

The FileDialog class has a property called ____, which is used by both the OpenFileDialog and SaveFileDialog classes to set or get the name of the file using a dialog box.

(Multiple Choice)
4.8/5
(67)

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

(Multiple Choice)
4.8/5
(62)

TextReader is an abstract class used to write primary data types as binary values.

(True/False)
4.9/5
(85)

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
(82)

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

(True/False)
4.8/5
(75)

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

(Multiple Choice)
4.9/5
(87)

Prior to writing program statements that access data in a file, you should always check to make sure the file is available using the Available( ) method.

(True/False)
4.8/5
(76)

When a method uses a(n) ____________ modifier, the method belongs to the class itself, not to a specific object of the class and is thus called using the class name.

(Short Answer)
4.7/5
(68)
Showing 41 - 60 of 75
close modal

Filters

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