Chapter 9 Summary File: Data saved in a file, on a computer disk. Input File: is a file from which a program reads data Output file: is a file into which a program writes data: Text file: contains plain text and may be opened in a text editor such as Windows Notepad. Binary files: is stored as pure binary data; the content cannot be viewed with a text editor. Sequential-access file: is like a stream of data that must be read from its beginning to its end Random-access file: may be accessed in any order StreamWriter object: Declare a SteamWriter variable or call either the File.CreateText or File.AppendText Method. WriteLine method- of the StreamWrite class writes a line of data to a file. Closed method: writes any unsaved information remaining in the file buffer and releases memory allocated by the StreamWriter object. Append- a file, we write new data immediately following existing data in the file. StreamReader Objectp is a object in an instance of the StreamReader class, which provides
This is the end of the preview. Sign up
access the rest of the document.