The .NET Framework provides classes that allow you to read and write files. Of course,
the most common type of files are disk files. At the operating system level, all files are byte
372
P a r t I :
T h e C # L a n g u a g e
oriented. As you would expect, there are methods to read and write bytes from and to a file.
Thus, reading and writing files using byte streams is very common. You can also wrap a
byte-oriented file stream within a character-based object. Character-based file operations
are useful when text is being stored. Character streams are discussed later in this chapter.
Byte-oriented I/O is described here.
To create a byte-oriented stream attached to a file, you will use the
Do'stlaringiz bilan baham: