共用方式為


BindConverter.TryConvertToInt(Object, CultureInfo, Int32) 方法

定義

嘗試將值轉換為 Int32

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

參數

obj
Object

要轉換的物件。

culture
CultureInfo

CultureInfo要用於轉換的 。

value
Int32

轉換的值。

傳回

true 如果轉換成功,則為 ,否則 false 為 。

適用於