BindConverter.TryConvertTo<T>(Object, CultureInfo, T) Method

Definition

Attempts to convert a value to a value of type T.

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

Type Parameters

T

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

value
T

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to