Читати англійською Редагувати

Поділитися через


XmlDictionaryWriter.CreateTextWriter Method

Definition

Creates an instance of XmlDictionaryWriter that writes text XML.

Overloads

CreateTextWriter(Stream, Encoding)

Creates an instance of XmlDictionaryWriter that writes text XML.

CreateTextWriter(Stream, Encoding, Boolean)

Creates an instance of XmlDictionaryWriter that writes text XML.

CreateTextWriter(Stream)

Creates an instance of XmlDictionaryWriter that writes text XML.

CreateTextWriter(Stream, Encoding)

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

Creates an instance of XmlDictionaryWriter that writes text XML.

C#
public static System.Xml.XmlDictionaryWriter CreateTextWriter(System.IO.Stream stream, System.Text.Encoding encoding);

Parameters

stream
Stream

The stream to write to.

encoding
Encoding

The character encoding of the output.

Returns

An instance of XmlDictionaryWriter.

Remarks

An instance of XmlDictionaryWriter.

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

CreateTextWriter(Stream, Encoding, Boolean)

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

Creates an instance of XmlDictionaryWriter that writes text XML.

C#
public static System.Xml.XmlDictionaryWriter CreateTextWriter(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream);

Parameters

stream
Stream

The stream to write to.

encoding
Encoding

The character encoding of the stream.

ownsStream
Boolean

true to indicate that the stream is closed by the writer when done; otherwise false.

Returns

An instance of XmlDictionaryWriter.

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

CreateTextWriter(Stream)

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

Creates an instance of XmlDictionaryWriter that writes text XML.

C#
public static System.Xml.XmlDictionaryWriter CreateTextWriter(System.IO.Stream stream);

Parameters

stream
Stream

The stream to write to.

Returns

An instance of XmlDictionaryWriter.

Remarks

The text writer writes the XML in UTF-8 format.

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