Use the StreamReader.DiscardBufferedData method to reset the internal buffer for the System.IO.StreamReader object. You need to call this method only when the position of the internal buffer and the StreamReader.BaseStream do not match. These positions can become mismatched when you read data into the buffer and then seek a new position in the underlying stream. This method slows performance and should be used only when absolutely necessary, such as when you want to read a portion of the contents of a System.IO.StreamReader object more than once.
For a list of common I/O tasks, see Common I/O Tasks.