Edit

Share via


XamlXmlWriter.WriteValue(Object) Method

Definition

Writes a XAML value node to the underlying XmlWriter or TextWriter. Throws an exception if the current position of the XAML node stream is invalid for writing a value, or the writer is in a state where a value cannot be written.

public override void WriteValue(object value);

Parameters

value
Object

The value information to write.

Exceptions

The current position of the XAML node stream is not valid for writing a value.

The XAML writer state does not support the writing of a value node.

value specifies a value that is not null or a string.

Remarks

The input value may be null, which supports explicitly writing out null as a serialized value. This behavior uses the XamlLanguage.Null definition as WriteStartObject input and then immediately calls WriteEndObject.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10