Share via


COMVariant.createFromBoolean Method

Definition

Overloads

createFromBoolean(Boolean, COMVariantInOut)
createFromBoolean(Boolean)

Creates a new COMVariant object and initializes it with a Boolean value in one operation.

createFromBoolean(Boolean, COMVariantInOut)

public:
 static Dynamics::AX::Application::COMVariant ^ createFromBoolean(bool _value, Dynamics::AX::Application::COMVariantInOut _inOutFlag);
public static Dynamics.AX.Application.COMVariant createFromBoolean (bool _value, Dynamics.AX.Application.COMVariantInOut _inOutFlag);
static member createFromBoolean : bool * Dynamics.AX.Application.COMVariantInOut -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromBoolean (_value As Boolean, _inOutFlag As COMVariantInOut) As COMVariant

Parameters

_value
Boolean

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are:

_inOutFlag
COMVariantInOut

A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional. Possible values are:

Returns

Applies to

createFromBoolean(Boolean)

Creates a new COMVariant object and initializes it with a Boolean value in one operation.

public:
 static Dynamics::AX::Application::COMVariant ^ createFromBoolean(bool flag1);
public static Dynamics.AX.Application.COMVariant createFromBoolean (bool flag1);
static member createFromBoolean : bool -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromBoolean (flag1 As Boolean) As COMVariant

Parameters

flag1
Boolean

Returns

The new COMVariant object.

Remarks

The COMVariant object that is created by this method has the data type VT_BOOL (Boolean). You can change the data type of an existing COMVariant object to VT_BOOL by using the variantType method or by passing in a Boolean value by using the boolean property method.

The following example creates a COMVariant object of the VT_BOOL variant data type (Boolean), and sets the value to true.

{ 
    COMVariant var; 
    var = COMVariant::createFromBoolean(TRUE); 
}

Applies to