FormattableString.IFormattable.ToString(String, IFormatProvider) 方法

定義

傳回使用指定文化特性 (Culture) 的格式化慣例將格式字串及其引數格式化所產生的字串。

 virtual System::String ^ System.IFormattable.ToString(System::String ^ ignored, IFormatProvider ^ formatProvider) = IFormattable::ToString;
string IFormattable.ToString (string ignored, IFormatProvider formatProvider);
abstract member System.IFormattable.ToString : string * IFormatProvider -> string
override this.System.IFormattable.ToString : string * IFormatProvider -> string
Function ToString (ignored As String, formatProvider As IFormatProvider) As String Implements IFormattable.ToString

參數

ignored
String

字串。 忽略這個引數。

formatProvider
IFormatProvider

物件,提供特定文化特性格式資訊。

傳回

使用 formatProvider 參數的慣例格式化的字串。

實作

備註

這個實作會呼叫衍生類別的 ToString(IFormatProvider) 實作。

這個成員是明確介面實作。 只有在 FormattableString 執行個體轉換成 IFormattable 介面時,才能使用這個成員。

適用於