Skip to content

UInt24.TryParse Method ​

Overloads ​

NameDescription
TryParse(String, IFormatProvider, UInt24)Tries to parse a string into a value.
TryParse(String, NumberStyles, IFormatProvider, UInt24)Attempts to parse an unsigned 24-bit integer.
TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt24)Tries to parse a span of characters into a value.
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt24)Attempts to parse an unsigned 24-bit integer.
TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt24)Tries to parse a span of UTF-8 characters into a value.
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UInt24)Tries to parse a span of UTF-8 characters into a value.

TryParse(String, IFormatProvider, UInt24) ​

Tries to parse a string into a value.

c#
public static bool TryParse(string? s, IFormatProvider? provider, out UInt24 result);

View source

Parameters ​

NameTypeDescription
sStringThe string to parse.
providerIFormatProviderAn object that provides culture-specific formatting information about s.
resultUInt24When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns ​

Boolean

true if s was successfully parsed; otherwise, false.

TryParse(String, NumberStyles, IFormatProvider, UInt24) ​

Attempts to parse an unsigned 24-bit integer.

c#
public static bool TryParse(string? s, NumberStyles style, IFormatProvider? provider, out UInt24 result);

View source

Parameters ​

NameTypeDescription
sStringThe text to parse.
styleNumberStylesThe permitted number styles.
providerIFormatProviderThe format provider.
resultUInt24The parsed value, or zero when parsing fails.

Returns ​

Boolean

true if parsing succeeds; otherwise, false.

TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt24) ​

Tries to parse a span of characters into a value.

c#
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out UInt24 result);

View source

Parameters ​

NameTypeDescription
sReadOnlySpan<Char>The span of characters to parse.
providerIFormatProviderAn object that provides culture-specific formatting information about s.
resultUInt24When this method returns, contains the result of successfully parsing s, or an undefined value on failure.

Returns ​

Boolean

true if s was successfully parsed; otherwise, false.

TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt24) ​

Attempts to parse an unsigned 24-bit integer.

c#
public static bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, out UInt24 result);

View source

Parameters ​

NameTypeDescription
sReadOnlySpan<Char>The text to parse.
styleNumberStylesThe permitted number styles.
providerIFormatProviderThe format provider.
resultUInt24The parsed value, or zero when parsing fails.

Returns ​

Boolean

true if parsing succeeds; otherwise, false.

TryParse(ReadOnlySpan<Byte>, IFormatProvider, UInt24) ​

Tries to parse a span of UTF-8 characters into a value.

c#
public static bool TryParse(ReadOnlySpan<Byte> utf8Text, IFormatProvider? provider, out UInt24 result);

View source

Parameters ​

NameTypeDescription
utf8TextReadOnlySpan<Byte>The span of UTF-8 characters to parse.
providerIFormatProviderAn object that provides culture-specific formatting information about utf8Text.
resultUInt24On return, contains the result of successfully parsing utf8Text or an undefined value on failure.

Returns ​

Boolean

true if utf8Text was successfully parsed; otherwise, false.

TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, UInt24) ​

Tries to parse a span of UTF-8 characters into a value.

c#
public static bool TryParse(ReadOnlySpan<Byte> utf8Text, NumberStyles style, IFormatProvider? provider, out UInt24 result);

View source

Parameters ​

NameTypeDescription
utf8TextReadOnlySpan<Byte>The span of UTF-8 characters to parse.
styleNumberStylesA bitwise combination of number styles that can be present in utf8Text.
providerIFormatProviderAn object that provides culture-specific formatting information about utf8Text.
resultUInt24On return, contains the result of successfully parsing utf8Text or an undefined value on failure.

Returns ​

Boolean

true if utf8Text was successfully parsed; otherwise, false.