Lire en anglais Modifier

Partager via


IParsable<TSelf>.TryParse(String, IFormatProvider, TSelf) Method

Definition

Tries to parse a string into a value.

C#
public static abstract bool TryParse(string? s, IFormatProvider? provider, out TSelf result);

Parameters

s
String

The string to parse.

provider
IFormatProvider

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

result
TSelf

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.

Applies to

Produit Versions
.NET 7, 8, 9, 10