語言

IParsable<TSelf>.Parse(String, IFormatProvider) 方法

定義

將字串剖析成值。

public:
 static TSelf Parse(System::String ^ s, IFormatProvider ^ provider);
public static abstract TSelf Parse(string s, IFormatProvider? provider);
static member Parse : string * IFormatProvider -> 'Self
Public Shared Function Parse (s As String, provider As IFormatProvider) As TSelf

參數

s
String

要剖析的字串。

provider
IFormatProvider

一個提供關於 s的文化特定格式資訊的物件。

傳回

TSelf

解析 的結果 s。

例外狀況

s 是 null。

s 格式不正確。

s 無法由 TSelf表示。

適用於