Dela via


BindConverter.TryConvertToInt(Object, CultureInfo, Int32) Method

Definition

Attempts to convert a value to a 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

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

value
Int32

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to