System.Xml.XmlWriter.WriteWhitespace Method

When overridden in a derived class, writes out the given white space.

Syntax

public abstract void WriteWhitespace (string ws)

Parameters

ws
The string of white space characters.

Exceptions

TypeReason
ArgumentException ws is null or string.Empty or contains non-white space characters.
InvalidOperationExceptionThe XmlWriter.WriteState is WriteState.Closed.

Remarks

This method is used to manually format your document.

For the asynchronous version of this method, see XmlWriter.WriteWhitespaceAsync(string).

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