XmlWriter.WriteValue Method (Object)

July 28, 2014

Writes the object value.

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public virtual void WriteValue(
	Object value
)

Parameters

value
Type: System.Object
The object value to write.
Note   With the release of the .NET Framework 3.5, this method accepts DateTimeOffset as a parameter.

ExceptionCondition
ArgumentException

An invalid value was specified.

ArgumentNullException

The value is null.

InvalidOperationException

The writer is closed or in error state.

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft