C# BinaryReader.BaseStream Caution Remark
On the BinaryReader.BaseStream
C# API Page, the following Caution Statement is made in the Remarks Section:
Using the underlying stream while reading or while using the BinaryReader can cause data loss and corruption. For example, the same bytes might be read more than once, bytes might be skipped, or character reading might become unpredictable.
Can anyone elaborate on this statement?
Here are some questions for starters:
- Why would the same byte be read more than once?
- Why would a byte be skipped?
- Why would character reading become unpredictable?