Condividi tramite


XmlWriter.WriteValue Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

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.

Overload List

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Boolean) Writes a Boolean value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(DateTime) Writes a DateTime value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Decimal) Writes a Decimal value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Double) Writes a Double value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Int32) Writes a Int32 value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Int64) Writes a Int64 value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Object) Writes the object value.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(Single) Writes a single-precision floating-point number.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 WriteValue(String) Writes a String value.

Top

Remarks

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.