Writes a section of a character array to the current stream and advances the current position of the stream in accordance with the Encoding used and perhaps the particular characters being written to the stream.
[Visual Basic] Overloads Public Sub Write( _ ByVal buffer() As Char, _ ByVal index As Integer, _ ByVal count As Integer _ ) [C#] public void Write( char[] buffer, int index, int count ); [C++] public: void Write( __wchar_t* buffer[], int index, int count ); [JScript] public function Write( buffer : Char[], index : int, count : int );
Exception Type | Condition |
---|---|
ArgumentException | The buffer length minus index is less than count. |
ArgumentNullException | buffer is a null reference (in Visual Basic Nothing). |
ArgumentOutOfRangeException | index or count is negative. |
IOException | An I/O error occurs. |
BinaryWriter Class | BinaryWriter Members | System.IO Namespace | BinaryWriter.Write Overload List