Boolean.IParsable<Boolean>.TryParse 方法

定义

尝试将字符串分析为值。

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

参数

s
String

要分析的字符串。

provider
IFormatProvider

一个对象,提供有关区域性特定的格式设置信息 s

result
Boolean

此方法返回时,包含成功分析 s的结果或失败时未定义的值。

返回

如果已成功分析,则为 0;否则为

适用于