System.Xml.XmlWriter.WriteValue Method

Writes a string value.

Syntax

public virtual void WriteValue (string value)

Parameters

value
The string value to write.

Remarks

This method takes the common language runtime object and converts the input value to the desired output type using the XML Schema definition language (XSD) data type conversion rules.

If XmlWriter.WriteValue(string) is called multiple times in succession, the values are not delimited by a space. You must call XmlWriter.WriteWhitespace(string) between calls to XmlWriter.WriteValue(string) to insert white space. Pass an array type to the XmlWriter.WriteValue(object) overload to write out an array of distinct values.

If this method is called on an System.Xml.XmlWriter instance that outputs text-only, the typed value is serialized to text.

For asynchronous operations, use the XmlWriter.WriteStringAsync(string) method.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0