Site MapHelpFeedbackMultiple Choice Quiz
Multiple Choice Quiz
(See related pages)

1
Sometimes, a project will need to save the information that the user inputs so that it can be used again. The information is stored and will later be accessed from a(n) _______.
A)Program file
B)Project file
C)Data file
D)User file
2
My.Computer.FileSystem.WriteAllText(FileName, StringToWrite, AppendBoolean) ______.
A)Creates a database file
B)Creates a text file
C)Is used to read data from a file
D)Is used to add data to a database
3
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
4
Which of the following steps does NOT occur when writing data to a data file?
A)A new StreamWriter object must be declared
B)The StreamWriter's WriteLine method will create a buffer in memory.
C)A new data file will always be created when a StreamWriter is declared.
D)The data to be written will be converted to string data.
5
Setting the BooleanAppend argument to true in the StreamWriter constructor _______.
A)Will create a new data file
B)Is used to add data to the end of existing data files
C)Adds data to the beginning of an existing data file
D)Reads data previously stored on disk
6
When instantiating a StreamWriter object, the name of the file on the disk _______.
A)Must be in uppercase characters
B)Appears immediately after the word as
C)Must be enclosed in quotes
D)All of the above
7
If you intend to add data to the end of an existing data file, you should set the _______ argument of the StreamWriter to True.
A)Boolean
B)Append
C)Output
D)BooleanAppend
8
If you intend to write data to an existing data file and it is your intention to overwrite all of the data in a file, you should _______.
A)Set the BooleanAppend argument of the StreamWriter constructor to true
B)Not include the BooleanAppend argument in the StreamWriter constructor
C)Set the BooleanAppend argument of the StreamWriter to False
D)Both answers B and C are correct
9
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)Write Line will write the data in the NameTextBox.Text textbox to the data file.
D)WriteLine will create a data file named NameTextBox.txt
10
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







Bradley:Programming in VB 2008Online Learning Center

Home > Chapter 11 > Multiple Choice Quiz