System Namespace Enum Class
Converts the value of this instance to its equivalent string representation using the specified format and format information.
[ VB ]
<Serializable>
NotOverridable Overloads Public Function ToString ( _
ByVal format As String, _
ByVal provider As IFormatProvider _
) As String
[ C# ]
[Serializable]
public string ToString (
string format,
IFormatProvider provider
);
[ C++ ]
[Serializable]
public: __sealed String* ToString (
String* format,
IFormatProvider* provider
);
[JScript ]
public Serializable
function ToString (
format : String,
provider : IFormatProvider
) : String;
- format
- A format specification.
- provider
- ( Reserved ) An IFormatProvider that supplies format information about this instance.
The string representation of the value of this instance as specified by format and provider.
Exception Type |
Condition |
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 ).
Enum Members Enum.ToString Overload List Format Parse