BindConverter.TryConvertToDateTime 方法

定义

重载

TryConvertToDateTime(Object, CultureInfo, DateTime)

尝试将值转换为 DateTime

TryConvertToDateTime(Object, CultureInfo, String, DateTime)

尝试将值转换为 DateTime

TryConvertToDateTime(Object, CultureInfo, DateTime)

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

尝试将值转换为 DateTime

public:
 static bool TryConvertToDateTime(System::Object ^ obj, System::Globalization::CultureInfo ^ culture, [Runtime::InteropServices::Out] DateTime % value);
public static bool TryConvertToDateTime (object obj, System.Globalization.CultureInfo culture, out DateTime value);
public static bool TryConvertToDateTime (object? obj, System.Globalization.CultureInfo? culture, out DateTime value);
static member TryConvertToDateTime : obj * System.Globalization.CultureInfo * DateTime -> bool
Public Shared Function TryConvertToDateTime (obj As Object, culture As CultureInfo, ByRef value As DateTime) As Boolean

参数

obj
Object

要转换的对象。

culture
CultureInfo

CultureInfo要用于转换的 。

value
DateTime

转换后的值。

返回

true 如果转换成功,则为 ;否则为 false

适用于

TryConvertToDateTime(Object, CultureInfo, String, DateTime)

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

尝试将值转换为 DateTime

public:
 static bool TryConvertToDateTime(System::Object ^ obj, System::Globalization::CultureInfo ^ culture, System::String ^ format, [Runtime::InteropServices::Out] DateTime % value);
public static bool TryConvertToDateTime (object obj, System.Globalization.CultureInfo culture, string format, out DateTime value);
public static bool TryConvertToDateTime (object? obj, System.Globalization.CultureInfo? culture, string format, out DateTime value);
static member TryConvertToDateTime : obj * System.Globalization.CultureInfo * string * DateTime -> bool
Public Shared Function TryConvertToDateTime (obj As Object, culture As CultureInfo, format As String, ByRef value As DateTime) As Boolean

参数

obj
Object

要转换的对象。

culture
CultureInfo

CultureInfo要用于转换的 。

format
String

在转换中使用的格式字符串。

value
DateTime

转换后的值。

返回

true 如果转换成功,则为 ;否则为 false

适用于