IUtf8SpanParsable<TSelf>.TryParse 方法

定義

嘗試將 UTF-8 字元的範圍剖析為值。

public:
 static bool TryParse(ReadOnlySpan<System::Byte> utf8Text, IFormatProvider ^ provider, [Runtime::InteropServices::Out] TSelf % result);
public static abstract bool TryParse (ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out TSelf result);
static member TryParse : ReadOnlySpan<byte> * IFormatProvider * 'Self -> bool
Public Shared Function TryParse (utf8Text As ReadOnlySpan(Of Byte), provider As IFormatProvider, ByRef result As TSelf) As Boolean

參數

utf8Text
ReadOnlySpan<Byte>

要剖析的 UTF-8 字元範圍。

provider
IFormatProvider

提供關於 utf8Text 之特定文化特性格式資訊的物件。

result
TSelf

傳回時,包含成功剖析 utf8Text 或失敗時未定義值的結果。

傳回

true 如果 utf8Text 已成功剖析,則為 ,否則為 false

適用於