共用方式為


Enum.ToString Method (String, IFormatProvider)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Note: This API is now obsolete.

This method overload is obsolete; use Enum.ToString(String).

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<ObsoleteAttribute("The provider argument is not used. Please use ToString(String).")> _
Public Function ToString ( _
    format As String, _
    provider As IFormatProvider _
) As String
[ObsoleteAttribute("The provider argument is not used. Please use ToString(String).")]
public string ToString(
    string format,
    IFormatProvider provider
)

Parameters

Return Value

Type: System.String
The string representation of the value of this instance, as specified by format.

Implements

IFormattable.ToString(String, IFormatProvider)

Exceptions

Exception Condition
FormatException

format does not contain a valid format specification.

Remarks

The provider parameter is obsolete, specify only a format.

Version Information

Silverlight

Obsolete (compiler warning) in 5
Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3

Silverlight for Windows Phone

Obsolete (compiler warning) in Windows Phone OS 7.1
Obsolete (compiler warning) in Windows Phone OS 7.0

XNA Framework

Obsolete (compiler warning) in Xbox 360
Obsolete (compiler warning) in Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.