Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
GetChars(Encoding, ReadOnlySequence<Byte>, IBufferWriter<Char>) |
Decodes the specified ReadOnlySequence<T> to |
GetChars(Encoding, ReadOnlySequence<Byte>, Span<Char>) |
Decodes the specified ReadOnlySequence<T> to |
GetChars(Encoding, ReadOnlySpan<Byte>, IBufferWriter<Char>) |
Decodes the specified ReadOnlySpan<T> to |
Decodes the specified ReadOnlySequence<T> to char
s using the specified Encoding and writes the result to writer
.
public:
[System::Runtime::CompilerServices::Extension]
static long GetChars(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<System::Byte> % bytes, System::Buffers::IBufferWriter<char> ^ writer);
public static long GetChars(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer);
static member GetChars : System.Text.Encoding * ReadOnlySequence * System.Buffers.IBufferWriter<char> -> int64
<Extension()>
Public Function GetChars (encoding As Encoding, ByRef bytes As ReadOnlySequence(Of Byte), writer As IBufferWriter(Of Char)) As Long
The encoding that represents how the data in bytes
should be decoded.
The sequence whose bytes should be decoded.
The buffer to which the decoded chars will be written.
The number of chars written to writer
.
bytes
contains data that cannot be decoded and encoding
is configured to throw when such data is seen.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
Decodes the specified ReadOnlySequence<T> to char
s using the specified Encoding and outputs the result to chars
.
public:
[System::Runtime::CompilerServices::Extension]
static int GetChars(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<System::Byte> % bytes, Span<char> chars);
public static int GetChars(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, Span<char> chars);
static member GetChars : System.Text.Encoding * ReadOnlySequence * Span<char> -> int
<Extension()>
Public Function GetChars (encoding As Encoding, ByRef bytes As ReadOnlySequence(Of Byte), chars As Span(Of Char)) As Integer
The encoding that represents how the data in bytes
is encoded.
The sequence to decode to characters.
The number of chars written to chars
.
chars
is not large enough to contain the encoded form of bytes
.
bytes
contains data that cannot be decoded and encoding
is configured to throw when such data is seen.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
Decodes the specified ReadOnlySpan<T> to char
s using the specified Encoding and writes the result to writer
.
public:
[System::Runtime::CompilerServices::Extension]
static long GetChars(System::Text::Encoding ^ encoding, ReadOnlySpan<System::Byte> bytes, System::Buffers::IBufferWriter<char> ^ writer);
public static long GetChars(this System.Text.Encoding encoding, ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer);
static member GetChars : System.Text.Encoding * ReadOnlySpan<byte> * System.Buffers.IBufferWriter<char> -> int64
<Extension()>
Public Function GetChars (encoding As Encoding, bytes As ReadOnlySpan(Of Byte), writer As IBufferWriter(Of Char)) As Long
The encoding that represents how the data in bytes
should be decoded.
The span of bytes to decode.
The buffer to which the decoded chars will be written.
The number of chars written to writer
.
bytes
contains data that cannot be decoded and encoding
is configured to throw when such data is seen.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in