語言

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

定義

使用指定的格式,格式化目前實例的值。

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

參數

format
String

應該使用的格式。

-或-

一個空參考(Nothing,Visual Basic中)用於使用為 IFormattable實作類型所定義的預設格式。

formatProvider
IFormatProvider

使用哪個服務提供者來格式化這個數值。

-或-

一個空參考(Nothing in Visual Basic)用來從作業系統目前的區域設定取得數值格式資訊。

傳回

目前實例在指定格式下的值。

實作

適用於