IsolatedStorageFileStream.Flush Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Clears buffers for this stream and causes any buffered data to be written to the file.

Namespace:   System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public override void Flush()

Because a buffer can be used for either reading or writing, but not both simultaneously, Flush performs two functions. First, any data previously written to the buffer is copied to the file and the buffer is cleared. Second, if CanSeek is true and data was previously copied from the file to the buffer for reading, the current position within the file is decremented by the number of unread bytes in the buffer. The buffer is then cleared.

Use the Flush(Boolean) method overload when you want to ensure that all buffered data in intermediate file buffers is written to disk.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: