String.IParsable<String>.TryParse Method

Definition

Tries to parse a string into a value.

 static bool System.IParsable<System.String>.TryParse(System::String ^ s, IFormatProvider ^ provider, [Runtime::InteropServices::Out] System::String ^ % result) = IParsable<System::String ^>::TryParse;
static bool IParsable<string>.TryParse(string s, IFormatProvider provider, out string result);
static member System.IParsable<System.String>.TryParse : string * IFormatProvider * string -> bool
 Shared Function TryParse (s As String, provider As IFormatProvider, ByRef result As String) As Boolean Implements IParsable(Of String).TryParse

Parameters

s
String

The string to parse.

provider
IFormatProvider

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

result
String

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