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

定义

使用指定格式对当前实例的值设置格式。

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

参数

format
String

要使用的格式。

- 或 -

null 引用(在 Visual Basic 中为 Nothing),用于使用为 IFormattable 实现的类型定义的默认格式。

provider
IFormatProvider

要用于格式化值的提供程序。

- 或 -

null 引用(在 Visual Basic 中为 Nothing),用于从操作系统的当前区域设置获取数字格式信息。

返回

采用指定格式的当前实例的值。

实现

适用于