Utf8.TryWrite 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32) |
將指定的插值字串寫入 UTF-8 位元組區間。 |
| TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32) |
將指定的插值字串寫入 UTF-8 位元組區間。 |
TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32)
- 來源:
- Utf8.cs
- 來源:
- Utf8.cs
- 來源:
- Utf8.cs
- 來源:
- Utf8.cs
將指定的插值字串寫入 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
參數
插值的串。
- bytesWritten
- Int32
當此方法返回時,包含寫入該區間的字元數。
傳回
true如果整個插值字串能成功格式化;否則,。 false
適用於
TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32)
- 來源:
- Utf8.cs
- 來源:
- Utf8.cs
- 來源:
- Utf8.cs
- 來源:
- Utf8.cs
將指定的插值字串寫入 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
參數
- provider
- IFormatProvider
物件,提供特定文化特性的格式資訊。
插值的串。
- bytesWritten
- Int32
當此方法返回時,包含寫入該區間的字元數。
傳回
true如果整個插值字串能成功格式化;否則,。 false