Export (0) Print
Expand All

Enum.ToString Method (String, IFormatProvider)

NOTE: This method is now obsolete.

Converts the value of this instance to its equivalent string representation using the specified format and format information.

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

[ObsoleteAttribute(L"The provider argument is not used. Please use ToString(String).")] 
public:
virtual String^ ToString (
	String^ format, 
	IFormatProvider^ provider
) sealed
/** @attribute ObsoleteAttribute("The provider argument is not used. Please use ToString(String).") */ 
public final String ToString (
	String format, 
	IFormatProvider provider
)
ObsoleteAttribute("The provider argument is not used. Please use ToString(String).") 
public final function ToString (
	format : String, 
	provider : IFormatProvider
) : String

Parameters

format

A format specification.

provider

(Reserved) An IFormatProvider that supplies format information about this instance.

Return Value

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

Exception typeCondition

FormatException

format does not contain a valid format specification.

The format parameter can contain format characters "G" or "g", "D" or "d", "X" or "x", and "F" or "f". If format is a null reference (Nothing in Visual Basic) or an empty string (""), the general format specifier ("G") is used. For more information about these format characters, see the Remarks section of the Format method. For more information about formatting in general, see Formatting Overview.

The provider parameter is reserved; it does not participate in this operation and can be specified as a null reference (Nothing in Visual Basic).

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 1.0, 1.1
Obsolete (compiler warning) in 2.0

.NET Compact Framework

Obsolete (compiler warning) in 2.0

Community Additions

ADD
Show:
© 2014 Microsoft