Partage via


IParsable<TSelf>.TryParse(String, IFormatProvider, TSelf) Méthode

Définition

Tente d’analyser une chaîne dans une valeur.

public:
 static bool TryParse(System::String ^ s, IFormatProvider ^ provider, [Runtime::InteropServices::Out] TSelf % result);
public static bool TryParse (string? s, IFormatProvider? provider, out TSelf result);
static member TryParse : string * IFormatProvider * 'Self -> bool
Public Shared Function TryParse (s As String, provider As IFormatProvider, ByRef result As TSelf) As Boolean

Paramètres

s
String

Chaîne à analyser.

provider
IFormatProvider

Objet qui fournit des informations de mise en forme propres à la culture concernant s.

result
TSelf

Lorsque cette méthode est retournée, contient le résultat de l’analyse s réussie ou d’une valeur non définie en cas d’échec.

Retours

Boolean

true si s elle a été analysée avec succès ; sinon, false.

S’applique à