Type Reason ArgumentNullException buffer is null. ArgumentException The buffer length minus index is less than count. ArgumentOutOfRangeException index or count is less than zero. InvalidOperationException The XmlWriter.WriteState is WriteState.Closed.
This method does not escape special characters.
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).