IsolatedStorageFileStream.Write Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Writes a block of bytes to the IsolatedStorageFileStream object using data read from a byte array.

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

Syntax

Public Overrides Sub Write ( _
    buffer As Byte(), _
    offset As Integer, _
    count As Integer _
)
public override void Write(
    byte[] buffer,
    int offset,
    int count
)

Parameters

Exceptions

Exception Condition
IsolatedStorageException

The isolated store has been removed.

-or-

The write attempt exceeds the quota for the IsolatedStorageFileStream object.

-or-

Isolated storage is disabled.

ArgumentException

offset and count describe an invalid range in buffer.

ArgumentNullException

buffer is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

offset or count is negative.

IOException

The stream is closed or an internal error has occurred.

-or-

Another thread may have caused an unexpected change in the position of the operating system’s file handle.

NotSupportedException

The stream does not support writing.

ObjectDisposedException

The stream has been disposed.

Remarks

The offset parameter gives the offset of the byte in the buffer at which to begin reading, and the count parameter gives the number of bytes that will be written to this IsolatedStorageFileStream object. If the write operation is successful, the current position of the IsolatedStorageFileStream object is advanced by the number of bytes written. If an exception occurs, the current position of the IsolatedStorageFileStream object is unchanged.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

IsolatedStorageFileStream Class

System.IO.IsolatedStorage Namespace