FormattableString.CurrentCulture(FormattableString) Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Zwraca ciąg wynikowy, w którym argumenty są formatowane przy użyciu konwencji bieżącej kultury.
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
Parametry
- formattable
- FormattableString
Ciąg do sformatowania.
Zwraca
Ciąg, który wynika z formatowania bieżącego wystąpienia przy użyciu konwencji bieżącej kultury.
Uwagi
Ta statyczna metoda może zostać zaimportowana w języku C# lub F# przez:
using static System.FormattableString;
"'fsharp open type 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} }}"