Share via


BindConverter.TryConvertToShort(Object, CultureInfo, Int16) Method

Definition

Attempts to convert a value to a Int16.

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

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

value
Int16

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to