Tuesday, October 5, 2010

File Handling Blog Tasks 1 and 2

BLOG TASK 1

1) The methods that can be used to open a sequential access file is AppendText,CreateText and OpenText
2) outFile.WriteLine(favouriteTuneTextBox.Text) would write the contents of the favouriteTuneTextBox’s text property and the newline character to the sequential access file that is associated with the outFile variable.
3) IO stand for Input Output.

BLOG TASK 2

1) OpenText is a procedure can be used to read information from a sequential access file.
2) Msg = inFile.ReadLine reads a line of text from the file associated with the inFile variable and assigns the line of text to the msg variable.
3) inFile.Close() is the statement required to close the file associated with the inFile variable.
4) The Peek method returns the character if there is another character to read.
5) If the file doesn’t contain another character to read the peek method returns a -1

No comments:

Post a Comment