Streams

Streams are a fundamental concept. In general, streams are nothing more than a sequence of data. The way streams work in C# is pretty similar to Java. Most I/O functions provided by the Mono framework are based on streams, which shows how important dealing with streams is.

Mono provides a set of efficient classes for working with streams. One thing that these classes have in common is that they've all been derived from a parent class called Stream.

Let's see the classes we're talking about (Stream and read/write classes):

  • BinaryReader: Reads basic data types

  • BinaryWriter: Writes basic data types

  • BufferedStream: Provides mechanisms to deal with buffered streams

  • CryptoStream: Provides interfaces to algorithms for encrypting data

  • FileStream ...

Get Mono Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.