IUtf8SpanParsable<TSelf>.Parse Method

Definition

Parses a span of UTF-8 characters into a value.

C#
public static abstract TSelf Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider);

Parameters

utf8Text
ReadOnlySpan<Byte>

The span of UTF-8 characters to parse.

provider
IFormatProvider

An object that provides culture-specific formatting information about utf8Text.

Returns

TSelf

The result of parsing utf8Text.

Exceptions

utf8Text is not in the correct format.

utf8Text is not representable by TSelf.

Applies to

Product Versions
.NET 8, 9, 10