System.Xml.XmlWriter.WriteElementString Method

Writes an element with the specified local name and value.

Syntax

public void WriteElementString (string localName, string value)

Parameters

value
The value of the element.
localName
The local name of the element.
value
The value of the element.

Exceptions

TypeReason
InvalidOperationExceptionThe XmlWriter.WriteState is WriteState.Closed.

Remarks

For the asynchronous version of this method, see XmlWriter.WriteElementStringAsync(string, 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