语言

FormattableString.CurrentCulture(FormattableString) 方法

定义

返回一个结果字符串,该字符串使用当前区域性的约定设置参数的格式。

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

参数

formattable
FormattableString

要设置格式的字符串。

返回

使用当前区域性的约定设置当前实例格式生成的字符串。

注解

此静态方法可以通过以下方法在 C# 或 F# 中导入:

using static System.FormattableString;

''fsharp 打开类型 System.FormattableString

Within the scope of that import directive, an interpolated string may be formatted in the current culture by writing, for example:
```csharp
    CurrentCulture($"{{ lat = {latitude}; lon = {longitude} }}");
    CurrentCulture $"{{ lat = {latitude}; lon = {longitude} }}"

适用于