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的結果,或失敗時為未定義的值。

傳回

trues 成功解析;否則, false

適用於