NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FileStream.Write

Writes a block of bytes to this stream using data from a buffer.

[Visual Basic]
Overrides Public Function Write( _
   ByVal array() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public override int Write(
   byte[] array,
   int offset,
   int count
);
[C++]
public: override int Write(
   unsigned char* array[],
   int offset,
   int count
);
[JScript]
public override function Write(
   array : Byte[],
   offset : int,
   count : int
) : int;

Parameters

array
The array to read.
offset
The byte offset in buffer at which to begin reading.
count
The maximum number of bytes to write.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (in Visual Basic Nothing).
ArgumentException offset and count describe an invalid range in array.
ArgumentOutOfRangeException offset or count are negative.
IOException An I/O error occurs.
NotSupportedException The stream does not support writing.

Remarks

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

See Also

FileStream Class | FileStream Members | System.IO Namespace