Bagikan melalui


Utf8.TryWrite Metode

Definisi

Overload

TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32)

Menulis string terinterpolasi yang ditentukan ke rentang byte UTF-8.

TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32)

Menulis string terinterpolasi yang ditentukan ke rentang byte UTF-8.

TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32)

Sumber:
Utf8.cs
Sumber:
Utf8.cs

Menulis string terinterpolasi yang ditentukan ke rentang byte UTF-8.

public:
 static bool TryWrite(Span<System::Byte> destination, System::Text::Unicode::Utf8::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryWrite (Span<byte> destination, ref System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler handler, out int bytesWritten);
static member TryWrite : Span<byte> * TryWriteInterpolatedStringHandler * int -> bool
Public Shared Function TryWrite (destination As Span(Of Byte), ByRef handler As Utf8.TryWriteInterpolatedStringHandler, ByRef bytesWritten As Integer) As Boolean

Parameter

destination
Span<Byte>

Rentang tempat string terinterpolasi harus diformat.

handler
Utf8.TryWriteInterpolatedStringHandler

String terinterpolasi.

bytesWritten
Int32

Ketika metode ini kembali, berisi jumlah karakter yang ditulis ke rentang.

Mengembalikan

true jika seluruh string terinterpolasi berhasil diformat; jika tidak, false.

Berlaku untuk

TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32)

Sumber:
Utf8.cs
Sumber:
Utf8.cs

Menulis string terinterpolasi yang ditentukan ke rentang byte UTF-8.

public:
 static bool TryWrite(Span<System::Byte> destination, IFormatProvider ^ provider, System::Text::Unicode::Utf8::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryWrite (Span<byte> destination, IFormatProvider? provider, ref System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler handler, out int bytesWritten);
static member TryWrite : Span<byte> * IFormatProvider * TryWriteInterpolatedStringHandler * int -> bool
Public Shared Function TryWrite (destination As Span(Of Byte), provider As IFormatProvider, ByRef handler As Utf8.TryWriteInterpolatedStringHandler, ByRef bytesWritten As Integer) As Boolean

Parameter

destination
Span<Byte>

Rentang tempat string terinterpolasi harus diformat.

provider
IFormatProvider

Objek yang memasok informasi pemformatan khusus budaya.

handler
Utf8.TryWriteInterpolatedStringHandler

String terinterpolasi.

bytesWritten
Int32

Ketika metode ini kembali, berisi jumlah karakter yang ditulis ke rentang.

Mengembalikan

true jika seluruh string terinterpolasi berhasil diformat; jika tidak, false.

Berlaku untuk