[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Clears the internal buffer.
Assembly: mscorlib (in mscorlib.dll)
Public Sub DiscardBufferedData
public void DiscardBufferedData()
Use the DiscardBufferedData method to reset the internal buffer for the StreamReader object. You need to call this method only when the position of the internal buffer and the 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 StreamReader object more than once.
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0