共用方式為


BindConverter.TryConvertToDateTime 方法

定義

多載

TryConvertToDateTime(Object, CultureInfo, DateTime)

嘗試將值轉換為 DateTime

TryConvertToDateTime(Object, CultureInfo, String, DateTime)

嘗試將值轉換為 DateTime

TryConvertToDateTime(Object, CultureInfo, DateTime)

來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
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)

來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
BindConverter.cs
來源:
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 為 。

適用於