FileStream.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 this stream using data from a buffer.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Overrides Sub Write ( _ array As Byte(), _ offset As Integer, _ count As Integer _ )
Parameters
- array
- Type:
System.Byte
()
The buffer containing data to write to the stream.
- offset
- Type: System.Int32
The zero-based byte offset in array at which to begin copying bytes to the current stream.
- count
- Type: System.Int32
The number of bytes to be written to the current stream.
| Exception | Condition |
|---|---|
| ArgumentNullException | array is Nothing. |
| ArgumentException | offset and count describe an invalid range in array. |
| ArgumentOutOfRangeException | offset or count is negative. |
| IOException | An I/O error occurs. - or - Another thread may have caused an unexpected change in the position of the operating system's file handle. |
| ObjectDisposedException | The stream is closed. |
| NotSupportedException | The current stream instance does not support writing. |