System.Xml.XmlWriter.WriteRaw Method

When overridden in a derived class, writes raw markup manually from a character buffer.

Syntax

public abstract void WriteRaw (char[] buffer, int index, int count)

Parameters

buffer
Character array containing the text to write.
index
The position within the buffer indicating the start of the text to write.
count
The number of characters to write.

Exceptions

TypeReason
ArgumentNullException buffer is null.
ArgumentExceptionThe buffer length minus index is less than count.
ArgumentOutOfRangeException index or count is less than zero.
InvalidOperationExceptionThe XmlWriter.WriteState is WriteState.Closed.

Remarks

This method does not escape special characters.

Note:

The System.Xml.XmlWriter does not validate the data that is passed to the XmlWriter.WriteRaw(Char[], int, int) method. You should not pass arbitrary data to this method.

For the asynchronous version of this method, see XmlWriter.WriteRawAsync(Char[], int, int).

Requirements

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