Bewerken

Delen via


Conversions.ToBoolean Method

Definition

Converts the specified object to a Boolean value.

Overloads

ToBoolean(Object)

Converts an object to a Boolean value.

ToBoolean(String)

Converts a string to a Boolean value.

ToBoolean(Object)

Source:
Conversions.vb
Source:
Conversions.vb
Source:
Conversions.vb

Converts an object to a Boolean value.

public:
 static bool ToBoolean(System::Object ^ Value);
public static bool ToBoolean (object Value);
public static bool ToBoolean (object? Value);
static member ToBoolean : obj -> bool
Public Shared Function ToBoolean (Value As Object) As Boolean

Parameters

Value
Object

The object to convert.

Returns

A Boolean value. Returns False if the object is null; otherwise, True.

Applies to

ToBoolean(String)

Source:
Conversions.vb
Source:
Conversions.vb
Source:
Conversions.vb

Converts a string to a Boolean value.

public:
 static bool ToBoolean(System::String ^ Value);
public static bool ToBoolean (string Value);
public static bool ToBoolean (string? Value);
static member ToBoolean : string -> bool
Public Shared Function ToBoolean (Value As String) As Boolean

Parameters

Value
String

The string to convert.

Returns

A Boolean value. Returns False if the string is null; otherwise, True.

Applies to