BindConverter.FormatValue 方法

定义

重载

FormatValue(Boolean, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Nullable<DateTimeOffset>, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<DateTime>, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<DateOnly>, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(DateTimeOffset, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(DateTime, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(DateOnly, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(TimeOnly, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Single, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Nullable<TimeOnly>, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<Single>, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Nullable<Int64>, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Nullable<Int32>, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Nullable<TimeOnly>, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<Int16>, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Nullable<Decimal>, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<DateTimeOffset>, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<DateTime>, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<DateOnly>, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<Boolean>, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Int64, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Int32, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Int16, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Double, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(Decimal, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(DateTimeOffset, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(DateTime, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(DateOnly, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Nullable<Double>, CultureInfo)

设置提供的 value 以包含在属性中的 的格式。

FormatValue(TimeOnly, String, CultureInfo)

将提供的 value 格式设置为 String

FormatValue<T>(T, CultureInfo)

将提供的 value 格式设置为 String

FormatValue(Boolean, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供的 value 以包含在属性中的 的格式。

public static bool FormatValue (bool value, System.Globalization.CultureInfo culture = default);
public static bool FormatValue (bool value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : bool * System.Globalization.CultureInfo -> bool
Public Shared Function FormatValue (value As Boolean, Optional culture As CultureInfo = Nothing) As Boolean

参数

value
Boolean

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<DateTimeOffset>, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (DateTimeOffset? value, string format, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (DateTimeOffset? value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<DateTimeOffset> * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of DateTimeOffset), format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<DateTimeOffset>

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<DateTime>, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (DateTime? value, string format, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (DateTime? value, string? format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<DateTime> * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of DateTime), format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<DateTime>

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<DateOnly>, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string? FormatValue (DateOnly? value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<DateOnly> * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of DateOnly), format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<DateOnly>

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(DateTimeOffset, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (DateTimeOffset value, string format, System.Globalization.CultureInfo culture = default);
public static string FormatValue (DateTimeOffset value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : DateTimeOffset * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As DateTimeOffset, format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
DateTimeOffset

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(DateTime, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (DateTime value, string format, System.Globalization.CultureInfo culture = default);
public static string FormatValue (DateTime value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : DateTime * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As DateTime, format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
DateTime

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(DateOnly, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (DateOnly value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : DateOnly * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As DateOnly, format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
DateOnly

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(TimeOnly, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (TimeOnly value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : TimeOnly * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As TimeOnly, Optional culture As CultureInfo = Nothing) As String

参数

value
TimeOnly

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (string value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (string? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As String, Optional culture As CultureInfo = Nothing) As String

参数

value
String

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Single, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (float value, System.Globalization.CultureInfo culture = default);
public static string FormatValue (float value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : single * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Single, Optional culture As CultureInfo = Nothing) As String

参数

value
Single

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<TimeOnly>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string? FormatValue (TimeOnly? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<TimeOnly> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of TimeOnly), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<TimeOnly>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Single>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (float? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (float? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<single> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of Single), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<Single>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Int64>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (long? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (long? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<int64> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of Long), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<Int64>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Int32>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (int? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (int? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<int> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of Integer), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<Int32>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<TimeOnly>, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string? FormatValue (TimeOnly? value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<TimeOnly> * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of TimeOnly), format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<TimeOnly>

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Int16>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string? FormatValue (short? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<int16> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of Short), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<Int16>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Decimal>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (decimal? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (decimal? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<decimal> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of Decimal), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<Decimal>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<DateTimeOffset>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (DateTimeOffset? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (DateTimeOffset? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<DateTimeOffset> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of DateTimeOffset), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<DateTimeOffset>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<DateTime>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string FormatValue (DateTime? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (DateTime? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<DateTime> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of DateTime), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<DateTime>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<DateOnly>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将 提供的 value 格式设置为 String

public static string? FormatValue (DateOnly? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<DateOnly> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of DateOnly), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<DateOnly>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Boolean>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static bool? FormatValue (bool? value, System.Globalization.CultureInfo culture = default);
public static bool? FormatValue (bool? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<bool> * System.Globalization.CultureInfo -> Nullable<bool>
Public Shared Function FormatValue (value As Nullable(Of Boolean), Optional culture As CultureInfo = Nothing) As Nullable(Of Boolean)

参数

value
Nullable<Boolean>

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Int64, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (long value, System.Globalization.CultureInfo culture = default);
public static string FormatValue (long value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : int64 * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Long, Optional culture As CultureInfo = Nothing) As String

参数

value
Int64

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Int32, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (int value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (int value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : int * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Integer, Optional culture As CultureInfo = Nothing) As String

参数

value
Int32

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Int16, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供 value 以包含在特性中的 的格式。

public static string FormatValue (short value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : int16 * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Short, Optional culture As CultureInfo = Nothing) As String

参数

value
Int16

要格式化的值。

culture
CultureInfo

格式化 CultureInfo 时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Double, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供的 value 以包含在属性中的 的格式。

public static string FormatValue (double value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (double value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : double * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Double, Optional culture As CultureInfo = Nothing) As String

参数

value
Double

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Decimal, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供的 value 以包含在属性中的 的格式。

public static string FormatValue (decimal value, System.Globalization.CultureInfo culture = default);
public static string FormatValue (decimal value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : decimal * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Decimal, Optional culture As CultureInfo = Nothing) As String

参数

value
Decimal

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(DateTimeOffset, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (DateTimeOffset value, System.Globalization.CultureInfo culture = default);
public static string FormatValue (DateTimeOffset value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : DateTimeOffset * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As DateTimeOffset, Optional culture As CultureInfo = Nothing) As String

参数

value
DateTimeOffset

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(DateTime, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (DateTime value, System.Globalization.CultureInfo culture = default);
public static string FormatValue (DateTime value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : DateTime * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As DateTime, Optional culture As CultureInfo = Nothing) As String

参数

value
DateTime

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(DateOnly, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (DateOnly value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : DateOnly * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As DateOnly, Optional culture As CultureInfo = Nothing) As String

参数

value
DateOnly

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(Nullable<Double>, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

设置提供的 value 以包含在属性中的 的格式。

public static string FormatValue (double? value, System.Globalization.CultureInfo culture = default);
public static string? FormatValue (double? value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : Nullable<double> * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As Nullable(Of Double), Optional culture As CultureInfo = Nothing) As String

参数

value
Nullable<Double>

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue(TimeOnly, String, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static string FormatValue (TimeOnly value, string format, System.Globalization.CultureInfo? culture = default);
static member FormatValue : TimeOnly * string * System.Globalization.CultureInfo -> string
Public Shared Function FormatValue (value As TimeOnly, format As String, Optional culture As CultureInfo = Nothing) As String

参数

value
TimeOnly

要格式化的值。

format
String

要使用的格式。 ToString(String, IFormatProvider)提供给 。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于

FormatValue<T>(T, CultureInfo)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

将提供的 value 格式设置为 String

public static object FormatValue<T> (T value, System.Globalization.CultureInfo culture = default);
public static object? FormatValue<T> (T value, System.Globalization.CultureInfo? culture = default);
static member FormatValue : 'T * System.Globalization.CultureInfo -> obj
Public Shared Function FormatValue(Of T) (value As T, Optional culture As CultureInfo = Nothing) As Object

类型参数

T

参数

value
T

要格式化的值。

culture
CultureInfo

格式 CultureInfo 设置时要使用的 。 默认为 CurrentCulture

返回

带格式的值。

适用于