EncodingExtensions.GetBytes Method

Definition

Overloads

GetBytes(Encoding, ReadOnlySequence<Char>)
GetBytes(Encoding, ReadOnlySequence<Char>, IBufferWriter<Byte>)
GetBytes(Encoding, ReadOnlySequence<Char>, Span<Byte>)
GetBytes(Encoding, ReadOnlySpan<Char>, IBufferWriter<Byte>)

GetBytes(Encoding, ReadOnlySequence<Char>)

public:
[System::Runtime::CompilerServices::Extension]
 static cli::array <System::Byte> ^ GetBytes(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<char> % chars);
public static byte[] GetBytes (this System.Text.Encoding encoding, ref System.Buffers.ReadOnlySequence<char> chars);
static member GetBytes : System.Text.Encoding * ReadOnlySequence -> byte[]
<Extension()>
Public Function GetBytes (encoding As Encoding, ByRef chars As ReadOnlySequence(Of Char)) As Byte()

Parameters

encoding
Encoding

Returns

Byte[]

GetBytes(Encoding, ReadOnlySequence<Char>, IBufferWriter<Byte>)

public:
[System::Runtime::CompilerServices::Extension]
 static long GetBytes(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<char> % chars, System::Buffers::IBufferWriter<System::Byte> ^ writer);
public static long GetBytes (this System.Text.Encoding encoding, ref System.Buffers.ReadOnlySequence<char> chars, System.Buffers.IBufferWriter<byte> writer);
static member GetBytes : System.Text.Encoding * ReadOnlySequence * System.Buffers.IBufferWriter<byte> -> int64
<Extension()>
Public Function GetBytes (encoding As Encoding, ByRef chars As ReadOnlySequence(Of Char), writer As IBufferWriter(Of Byte)) As Long

Parameters

encoding
Encoding

Returns

Int64

GetBytes(Encoding, ReadOnlySequence<Char>, Span<Byte>)

public:
[System::Runtime::CompilerServices::Extension]
 static int GetBytes(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<char> % chars, Span<System::Byte> bytes);
public static int GetBytes (this System.Text.Encoding encoding, ref System.Buffers.ReadOnlySequence<char> chars, Span<byte> bytes);
static member GetBytes : System.Text.Encoding * ReadOnlySequence * Span<byte> -> int
<Extension()>
Public Function GetBytes (encoding As Encoding, ByRef chars As ReadOnlySequence(Of Char), bytes As Span(Of Byte)) As Integer

Parameters

encoding
Encoding
bytes
Span<Byte>

Returns

Int32

GetBytes(Encoding, ReadOnlySpan<Char>, IBufferWriter<Byte>)

public:
[System::Runtime::CompilerServices::Extension]
 static long GetBytes(System::Text::Encoding ^ encoding, ReadOnlySpan<char> chars, System::Buffers::IBufferWriter<System::Byte> ^ writer);
public static long GetBytes (this System.Text.Encoding encoding, ReadOnlySpan<char> chars, System.Buffers.IBufferWriter<byte> writer);
static member GetBytes : System.Text.Encoding * ReadOnlySpan<char> * System.Buffers.IBufferWriter<byte> -> int64
<Extension()>
Public Function GetBytes (encoding As Encoding, chars As ReadOnlySpan(Of Char), writer As IBufferWriter(Of Byte)) As Long

Parameters

encoding
Encoding

Returns

Int64

Applies to