Прочетете на английски Редактиране

Споделяне чрез


FormattableString.IFormattable.ToString(String, IFormatProvider) Method

Definition

Returns the string that results from formatting the format string along with its arguments by using the formatting conventions of a specified culture.

C#
string IFormattable.ToString(string ignored, IFormatProvider formatProvider);

Parameters

ignored
String

A string. This argument is ignored.

formatProvider
IFormatProvider

An object that provides culture-specific formatting information.

Returns

A string formatted using the conventions of the formatProvider parameter.

Implements

Remarks

This implementation calls the derived class' ToString(IFormatProvider) implementation.

This member is an explicit interface implementation. It can be used only when the FormattableString instance is cast to an IFormattable interface.

Applies to

Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.5, 1.6, 2.0, 2.1
UWP 10.0