XmlWriter.WriteValue Method (Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Writes the object value.
Assembly: System.Xml (in System.Xml.dll)
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.
| Exception | Condition |
|---|---|
| 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.
Show: