COMVariant.uInt Method

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

Syntax

public int uInt([int newValue])

Run On

Called

Parameters

  • newValue
    Type: int
    The new value; optional.

Return Value

Type: int
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.

The COMVariantType::VT_UI4 data type is also used for the uLong data type.

Examples

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

{ 
    COMVariant var = new COMVariant( 
        COMVariantInOut::IN_OUT,  
        COMVariantType::VT_UI4); 
  
    // Set value of the object 
    var.uInt(123456); 
}

See Also

COMVariant Class

COMVariantType Enumeration

COMVariant.new Method

COMVariant.variantType Method

COMVariant.uLong Method