XmlDictionaryReader.ReadContentAsString Method

Definition

Converts a node's content to a string.

Overloads

ReadContentAsString()

Converts a node's content to a string.

ReadContentAsString(Int32)

Converts a node's content to a string.

ReadContentAsString(String[], Int32)

Converts a node's content to a string.

ReadContentAsString(XmlDictionaryString[], Int32)

Converts a node's content to a string.

ReadContentAsString()

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Converts a node's content to a string.

C#
public override string ReadContentAsString();

Returns

The node content in a string representation.

Remarks

The string returned by this read operation is limited by the MaxStringContentLength quota

Applies to

.NET 10 and other versions
Product Versions
.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

ReadContentAsString(Int32)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Converts a node's content to a string.

C#
protected string ReadContentAsString(int maxStringContentLength);

Parameters

maxStringContentLength
Int32

The maximum string length.

Returns

Node content in string representation.

Remarks

The string returned by this read operation is limited by the MaxStringContentLength quota.

Applies to

.NET 10 and other versions
Product Versions
.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

ReadContentAsString(String[], Int32)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Converts a node's content to a string.

C#
public virtual string ReadContentAsString(string[] strings, out int index);

Parameters

strings
String[]

The array of strings to match content against.

index
Int32

The index of the entry in strings that matches the content.

Returns

The node content in a string representation.

Exceptions

strings is null.

-or-

An entry in strings is null.

Applies to

.NET 10 and other versions
Product Versions
.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

ReadContentAsString(XmlDictionaryString[], Int32)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Converts a node's content to a string.

C#
public virtual string ReadContentAsString(System.Xml.XmlDictionaryString[] strings, out int index);

Parameters

strings
XmlDictionaryString[]

The array of XmlDictionaryString objects to match content against.

index
Int32

The index of the entry in strings that matches the content.

Returns

The node content in a string representation.

Exceptions

strings is null.

-or-

An entry in strings is null.

Applies to

.NET 10 and other versions
Product Versions
.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