Mono Class Library: System.Xml.XmlTextWriter Overview | Members

System.Xml.XmlTextWriter.WriteChars Method

Writes text a buffer at a time.

public override void WriteChars (char[] buffer, int index, int count)

Parameters

buffer
A char array containing the text to write.
index
A int specifying the position within the array of the start of the text to write.
count
A int specifying the number of characters to write.

Exceptions

TypeReason
ArgumentNullExceptionbuffer is null.
ArgumentOutOfRangeException

index or count is less than zero.

- or -

The buffer length minus index is less than count.

InvalidOperationExceptionThe XmlTextWriter.WriteState is WriteState.Closed.

Remarks

Note:

This method can be used to write large amounts of text a buffer at a time.

An exception is thrown if surrogate pair characters would be split across multiple buffer writes. This exception must be caught in order to continue writing the next surrogate pair characters. The XML specification defines the valid ranges for surrogate pairs.

This method overrides XmlWriter.WriteChars(Char[], int, int).

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0