IParsable<TSelf>.Parse(String, IFormatProvider) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將字串剖析成值。
public:
static TSelf Parse(System::String ^ s, IFormatProvider ^ provider);
public static 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
表示。