Enum::ToString Method (String^, IFormatProvider^)

 
Note: This API is now obsolete.

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

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

public:
[ObsoleteAttribute("The provider argument is not used. Please use ToString(String).")]
virtual String^ ToString(
	String^ format,
	IFormatProvider^ provider
) sealed

Parameters

format
Type: System::String^

A format specification.

provider
Type: System::IFormatProvider^

(Obsolete.)

Return Value

Type: System::String^

The string representation of the value of this instance as specified by format.

Exception Condition
FormatException

format does not contain a valid format specification.

InvalidOperationException

format equals "X", but the enumeration type is unknown.

The format parameter can contain the "G" or "g", "D" or "d", "X" or "x", and "F" or "f" format strings (the format string is not case-sensitive). If format is null or an empty string (""), the general format specifier ("G") is used. For more information about the enumeration format strings and formatting enumeration values, see Enumeration Format Strings. For more information about formatting in general, see Formatting Types in the .NET Framework.

Specify only format; the provider parameter is obsolete.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: