WriteValue Method
TOC
Collapse the table of content
Expand the table of content

XmlWriter.WriteValue Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Writes a single simple-typed value.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method WriteValue(Boolean) Writes a Boolean value.
Public method WriteValue(DateTime) Writes a DateTime value.
Public method WriteValue(DateTimeOffset) Writes a DateTimeOffset value.
Public method WriteValue(Decimal) Writes a Decimal value.
Public method WriteValue(Double) Writes a Double value.
Public method WriteValue(Int32) Writes a Int32 value.
Public method WriteValue(Int64) Writes a Int64 value.
Public method WriteValue(Object) Writes the object value.
Public method WriteValue(Single) Writes a single-precision floating-point number.
Public method WriteValue(String) Writes a String value.
Top

The WriteValue method accepts common language runtime (CLR) simple-typed values. This allows you to pipeline simple-type values with minimal re-parsing overhead when passing data between XmlReader, and XmlWriter objects. This ability is also useful when dealing with CLR simple-types and an XmlWriter instance. You can call the WriteValue method to write the typed value, rather than using the methods on the XmlConvert class to convert the typed data to a string value before writing it out.

Show:
© 2017 Microsoft