Filters
Question type

Study Flashcards

When reading data in a data file,the data will be read _______.


A) in alphabetical order
B) in the order in which it was written
C) in key field order
D) in random order

E) A) and C)
F) C) and D)

Correct Answer

verifed

verified

Using a text editor such as Notepad,you can view the contents of a data file with a .txt file extension.

A) True
B) False

Correct Answer

verifed

verified

True

It is not necessary to use a Try/Catch block when declaring a StreamReader object.

A) True
B) False

Correct Answer

verifed

verified

New data will be appended to the existing data file if you are using a StreamWriter that specifies the name of a data file that already exists and the code does not include a value for the BooleanAppend argument.

A) True
B) False

Correct Answer

verifed

verified

The WriteAllText()method reads data from a text file.

A) True
B) False

Correct Answer

verifed

verified

A new data file will be created if the filename does not exist when declaring a new StreamWriter object.

A) True
B) False

Correct Answer

verifed

verified

A delimited file is a data file that has all of the data stored on one line.

A) True
B) False

Correct Answer

verifed

verified

The StreamWriter's Close method does not always release the information in the buffer that is related to that file.

A) True
B) False

Correct Answer

verifed

verified

The Peek method reads the next data element in a data file.

A) True
B) False

Correct Answer

verifed

verified

False

You can load data from a data file into a list box during run time by looping through the file and adding the file elements into the list.

A) True
B) False

Correct Answer

verifed

verified

The StreamReader is used to create a data file.

A) True
B) False

Correct Answer

verifed

verified

What is the purpose of "WriteLine" in the following statement? PhoneStreamWriter.WriteLine(NameTextBox.Text)


A) WriteLine refers to the number of fields in the record.
B) WriteLine will display the content of NameTextBox.Text in a label named phoneStreamWriter.
C) WriteLine will write the data in the NameTextBox.Text textbox to the data file.
D) WriteLine will create a data file named NameTextBox.txt.

E) None of the above
F) All of the above

Correct Answer

verifed

verified

In the statement,PhoneStreamWriter.WriteLine(NameTextBox.Text) ,NameTextBox.Text refers to _______.


A) the record number
B) the variable that will store the data in NameTextBox
C) the data file number
D) the Text property of the object that contains the data that will be written to disk

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

If you use the following line of code: Dim TestStreamWriter as New StreamWriter("Test.txt")and the file,Test.txt,already exists,a new file will be created and the existing file will be overwritten.

A) True
B) False

Correct Answer

verifed

verified

Use the StreamReader's Peek method to determine if there is more data in a file.

A) True
B) False

Correct Answer

verifed

verified

VbCrLf is a VB intrinsic constant for a carriage return and a line feed.

A) True
B) False

Correct Answer

verifed

verified

True

Each element in a data file must be read in the same sequence as it was written.

A) True
B) False

Correct Answer

verifed

verified

Which of the following will occur if you are opening a data file with the StreamReader object and the file does not exist?


A) The file will be created.
B) An exception will occur.
C) VB will automatically use the last file created with the StreamWriter.
D) VB will shut down the computer.

E) All of the above
F) A) and C)

Correct Answer

verifed

verified

When you are finished working with a data file,you should _______ the file.


A) Close
B) Append
C) Output
D) Answers A and B are both correct

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

The _______ method of My.Computer.FileSystem is used to read an entire file into a single string.


A) WriteAllText
B) ReadAllText
C) ReadLine
D) WriteLine

E) C) and D)
F) All of the above

Correct Answer

verifed

verified

Showing 1 - 20 of 43

Related Exams

Show Answer