Прочетете на английски Редактиране

Споделяне чрез


XmlDictionaryWriter.WriteValue Method

Definition

Writes a single simple-typed value.

Overloads

WriteValue(Guid)

Writes a Guid value.

WriteValue(TimeSpan)

Writes a TimeSpan value.

WriteValue(IStreamProvider)

Writes a value from an IStreamProvider.

WriteValue(UniqueId)

Writes a Unique Id value.

WriteValue(XmlDictionaryString)

Writes a XmlDictionaryString value.

WriteValue(Guid)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Writes a Guid value.

C#
public virtual void WriteValue(Guid value);

Parameters

value
Guid

The Guid value to write.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.0, 3.5, 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
.NET Standard 2.0, 2.1
UWP 10.0

WriteValue(TimeSpan)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Writes a TimeSpan value.

C#
public virtual void WriteValue(TimeSpan value);

Parameters

value
TimeSpan

The TimeSpan value to write.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.0, 3.5, 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
.NET Standard 2.0, 2.1
UWP 10.0

WriteValue(IStreamProvider)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Writes a value from an IStreamProvider.

C#
public virtual void WriteValue(System.Xml.IStreamProvider value);

Parameters

value
IStreamProvider

The IStreamProvider value to write.

Exceptions

value is null.

value returns a null stream object.

An XmlDictionaryWriter method was called before a previous asynchronous operation finished. In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."

Remarks

The contents of the stream provided by the IStreamProvider are written as Base64 data, unless this method is overridden in a derived class.

For the asynchronous version of this method, see WriteValueAsync.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.0, 3.5, 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
.NET Standard 2.0, 2.1

WriteValue(UniqueId)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Writes a Unique Id value.

C#
public virtual void WriteValue(System.Xml.UniqueId value);

Parameters

value
UniqueId

The Unique Id value to write.

Exceptions

value is null.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.0, 3.5, 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
.NET Standard 2.0, 2.1
UWP 10.0

WriteValue(XmlDictionaryString)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Writes a XmlDictionaryString value.

C#
public virtual void WriteValue(System.Xml.XmlDictionaryString value);
C#
public virtual void WriteValue(System.Xml.XmlDictionaryString? value);

Parameters

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 3.0, 3.5, 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
.NET Standard 2.0, 2.1
UWP 10.0