FormattableString.CurrentCulture(FormattableString) FormattableString.CurrentCulture(FormattableString) FormattableString.CurrentCulture(FormattableString) FormattableString.CurrentCulture(FormattableString) Method

Definition

Returns a result string in which arguments are formatted by using the conventions of the current culture.

public:
 static System::String ^ CurrentCulture(FormattableString ^ formattable);
public static string CurrentCulture (FormattableString formattable);
static member CurrentCulture : FormattableString -> string
Public Shared Function CurrentCulture (formattable As FormattableString) As String

Parameters

Returns

The string that results from formatting the current instance by using the conventions of the current culture.

Remarks

This static method may be imported in C# by:

    using static System.FormattableString;

Within the scope of that import directive, an interpolated string may be formatted in the current culture by writing, for example:

    CurrentCulture($"{{ lat = {latitude}; lon = {longitude} }}");

Applies to