Share via


BindConverter.TryConvertToNullableInt Method

Definition

Attempts to convert a value to a nullable Int32.

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

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

value
Nullable<Int32>

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to