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

定义

警告

此 API 现已过时。

此方法重载已过时;请使用 ToString(String)This method overload is obsolete; use ToString(String).

 virtual System::String ^ System.IFormattable.ToString(System::String ^ format, IFormatProvider ^ provider) = IFormattable::ToString;
[System.Obsolete("The provider argument is not used. Please use ToString(String).")]
string IFormattable.ToString (string format, IFormatProvider provider);
Function ToString (format As String, provider As IFormatProvider) As String Implements IFormattable.ToString

参数

format
String

格式规范。A format specification.

provider
IFormatProvider

返回

此实例的值的字符串表示形式,由 format 指定。The string representation of the value of this instance, as specified by format.

实现

属性

异常

format 不包含有效的格式规范。format does not contain a valid format specification.

format 等于“X”,但枚举类型未知。format equals "X", but the enumeration type is unknown.

适用于