COMVariant.double Method

Definition

Overloads

double()

Gets or sets the value of a COMVariant object of the VT_R8 data type.

double(Decimal)

double()

Gets or sets the value of a COMVariant object of the VT_R8 data type.

public:
 virtual System::Decimal double();
public virtual decimal double ();
abstract member double : unit -> decimal
override this.double : unit -> decimal
Public Overridable Function double () As Decimal

Returns

The current value.

Remarks

If you pass in a value that has a different data type than the object, the data type of the object will be changed to match the data type of the value. A COMVariant object has a double data type if its data type is set to COMVariantType::VT_R8.

The following example creates a new COMVariant object of type VT_R8 and sets the value to 123.456.

{ 
    COMVariant var = new COMVariant( 
        COMVariantInOut::IN_OUT,  
        COMVariantType::VT_R8); 
    // Set value of the object 
    var.double(123.456); 
}

Applies to

double(Decimal)

public:
 virtual System::Decimal double(System::Decimal _newValue);
public virtual decimal double (decimal _newValue);
abstract member double : decimal -> decimal
override this.double : decimal -> decimal
Public Overridable Function double (_newValue As Decimal) As Decimal

Parameters

_newValue
Decimal

The new value; optional.

Returns

Applies to