Share via


BindConverter.TryConvertToBool(Object, CultureInfo, Boolean) Method

Definition

Attempts to convert a value to a Boolean.

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

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

value
Boolean

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to