You should never create a Stream Object directly
The Stream abstract class represents a sequence of bytes going to or coming from a storage medium.
The storage medium could be a file or a physical or virtual device.
You can have file streams, memory streams, network streams and tape streams.
The basic operations for a stream are read, write and seek.
Before you can do anything with the stream you have to attach it to a reader or writer.
Use the FileStream class to read from, write to, open, and close files on a file system
StreamReader and StreamWriter
The generic stream objects can read and write only individual bytes or groups of bytes.
It is often easier to work with more structured data such as lines of text or a specific value.
The StreamReader and StreamWriter classes allow you to work with strings of text in ANSI format.
The StreamReader and StreamWriter classes can work in conjunction with an Encoder object which determines how characters are encoded in the stream
Classes derived from Stream
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext