COMVariant.createFromReal Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
createFromReal(Decimal) |
Creates a new COMVariant object and initializes it with a real value in one operation. |
createFromReal(Decimal, COMVariantInOut) |
createFromReal(Decimal)
Creates a new COMVariant object and initializes it with a real value in one operation.
public:
static Dynamics::AX::Application::COMVariant ^ createFromReal(System::Decimal decimal1);
public static Dynamics.AX.Application.COMVariant createFromReal (decimal decimal1);
static member createFromReal : decimal -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromReal (decimal1 As Decimal) As COMVariant
Parameters
- decimal1
- Decimal
Returns
The new COMVariant object.
Remarks
The COMVariant object that is created by this method has the data type VT_R8 (real). You can change the data type of an existing COMVariant object to VT_R8 by using the variantType method or by passing in a Boolean value by using the double property method.
The following example creates a COMVariant object of the VT_R8 variant data type (real) and sets the value to 123.456.
{
COMVariant var;
var = COMVariant::createFromReal(123.456);
}
Applies to
createFromReal(Decimal, COMVariantInOut)
public:
static Dynamics::AX::Application::COMVariant ^ createFromReal(System::Decimal _value, Dynamics::AX::Application::COMVariantInOut _inOutFlag);
public static Dynamics.AX.Application.COMVariant createFromReal (decimal _value, Dynamics.AX.Application.COMVariantInOut _inOutFlag);
static member createFromReal : decimal * Dynamics.AX.Application.COMVariantInOut -> Dynamics.AX.Application.COMVariant
Public Shared Function createFromReal (_value As Decimal, _inOutFlag As COMVariantInOut) As COMVariant
Parameters
- _value
- Decimal
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: