Utf8.TryWrite Method
Definition
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.
Overloads
TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32) |
Writes the specified interpolated string to the UTF-8 byte span. |
TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32) |
Writes the specified interpolated string to the UTF-8 byte span. |
TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32)
- Source:
- Utf8.cs
- Source:
- Utf8.cs
Writes the specified interpolated string to the UTF-8 byte span.
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
Parameters
The interpolated string.
- bytesWritten
- Int32
When this method returns, contains the number of characters written to the span.
Returns
true
if the entire interpolated string could be formatted successfully; otherwise, false
.
Applies to
TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32)
- Source:
- Utf8.cs
- Source:
- Utf8.cs
Writes the specified interpolated string to the UTF-8 byte span.
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
Parameters
- provider
- IFormatProvider
An object that supplies culture-specific formatting information.
The interpolated string.
- bytesWritten
- Int32
When this method returns, contains the number of characters written to the span.
Returns
true
if the entire interpolated string could be formatted successfully; otherwise, false
.