String.IParsable<String>.TryParse 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試將字串剖析成值。
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
參數
- s
- String
要剖析的字串。
- provider
- IFormatProvider
一個提供關於 s的文化特定格式資訊的物件。
- result
- String
當此方法回傳時,包含成功解析 s的結果,或失敗時為未定義的值。
傳回
true 若 s 成功解析;否則, false。