EncodingExtensions.GetString(Encoding, ReadOnlySequence<Byte>) Method

Definition

Decodes the specified ReadOnlySequence<T> into a String using the specified Encoding.

public static string GetString (this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes);

Parameters

encoding
Encoding

The encoding that represents how the data in bytes is encoded.

bytes
ReadOnlySequence<Byte>

The sequence to decode into characters.

Returns

A String which represents the decoded contents of bytes.

Exceptions

bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Applies to

Prodotto Versioni
.NET 5, 6, 7, 8, 9