Summary


Streams let a program consider a wide variety of data sources in a uniform way. If a subroutine takes a stream as a parameter, it doesn’t care whether the stream is attached to a string, file, block of memory, or network connection.

Many applications use the StringReader and StringWriter classes to read and write text in strings, and the StreamReader and StreamWriter classes to read and write text in streams (usually files). The Exists, OpenText, CreateText, and AppendText methods are particularly useful for working with StreamReader and StreamWriter objects associated with text files.

The other stream classes are often used at lower levels or as more abstract classes to allow a routine to process different kinds of streams in a uniform way. If you focus on these four classes, you will quickly learn how to perform the most common stream operations.

Programs often use the StreamReader and StreamWriter classes to read and write files. Chapter 29 describes classes that let a Visual Basic application interact with the file system in other ways. These classes let a program examine, rename, move, and delete files and directories.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net