UInt24.TryParse Method ​
Overloads ​
| Name | Description |
|---|---|
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);Parameters ​
| Name | Type | Description |
|---|---|---|
s | String | The string to parse. |
provider | IFormatProvider | An object that provides culture-specific formatting information about s. |
result | UInt24 | When this method returns, contains the result of successfully parsing s or an undefined value on failure. |
Returns ​
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);Parameters ​
| Name | Type | Description |
|---|---|---|
s | String | The text to parse. |
style | NumberStyles | The permitted number styles. |
provider | IFormatProvider | The format provider. |
result | UInt24 | The parsed value, or zero when parsing fails. |
Returns ​
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);Parameters ​
| Name | Type | Description |
|---|---|---|
s | ReadOnlySpan<Char> | The span of characters to parse. |
provider | IFormatProvider | An object that provides culture-specific formatting information about s. |
result | UInt24 | When this method returns, contains the result of successfully parsing s, or an undefined value on failure. |
Returns ​
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);Parameters ​
| Name | Type | Description |
|---|---|---|
s | ReadOnlySpan<Char> | The text to parse. |
style | NumberStyles | The permitted number styles. |
provider | IFormatProvider | The format provider. |
result | UInt24 | The parsed value, or zero when parsing fails. |
Returns ​
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);Parameters ​
| Name | Type | Description |
|---|---|---|
utf8Text | ReadOnlySpan<Byte> | The span of UTF-8 characters to parse. |
provider | IFormatProvider | An object that provides culture-specific formatting information about utf8Text. |
result | UInt24 | On return, contains the result of successfully parsing utf8Text or an undefined value on failure. |
Returns ​
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);Parameters ​
| Name | Type | Description |
|---|---|---|
utf8Text | ReadOnlySpan<Byte> | The span of UTF-8 characters to parse. |
style | NumberStyles | A bitwise combination of number styles that can be present in utf8Text. |
provider | IFormatProvider | An object that provides culture-specific formatting information about utf8Text. |
result | UInt24 | On return, contains the result of successfully parsing utf8Text or an undefined value on failure. |
Returns ​
true if utf8Text was successfully parsed; otherwise, false.