Enum.IFormattable.ToString(String, IFormatProvider) Method

Definition

Caution

The provider argument is not used. Please use ToString(String).

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

C#
[System.Obsolete("The provider argument is not used. Please use ToString(String).")]
string IFormattable.ToString(string format, IFormatProvider provider);

Parameters

format
String

A format specification.

provider
IFormatProvider

An IFormatProvider implementation that supplies culture-specific information about the format of the returned value. This argument is not used.

Returns

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

Implements

Attributes

Exceptions

format does not contain a valid format specification.

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

Applies to

Product Versions (Obsolete)
.NET (Core 1.0, Core 1.1)
.NET Standard (1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6)
UWP (10.0)