VariantType VariantType VariantType VariantType Enum

Definition

Indicates the type of a variant object, returned by the VarType function.

public enum class VariantType
public enum VariantType
type VariantType = 
Public Enum VariantType
Inheritance

Fields

Array Array Array Array 8192

Array. This member is equivalent to the Visual Basic constant vbArray.

Boolean Boolean Boolean Boolean 11

Boolean. (True or False.) This member is equivalent to the Visual Basic constant vbBoolean.

Byte Byte Byte Byte 17

Byte. (0 through 255.) This member is equivalent to the Visual Basic constant vbByte.

Char Char Char Char 18

Char. (0 through 65535.) This member is equivalent to the Visual Basic constant vbChar.

Currency Currency Currency Currency 6

Currency. This member is equivalent to the Visual Basic constant vbCurrency.

DataObject DataObject DataObject DataObject 13

DataObject.

Date Date Date Date 7

Date. (0:00:00 on January 1, 0001 through 11:59:59 PM on December 31, 9999.) This member is equivalent to the Visual Basic constant vbDate.

Decimal Decimal Decimal Decimal 14

Decimal. (0 through +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; 0 through +/-7.9228162514264337593543950335 with 28 places to the right of the decimal; smallest non-zero number is +/-0.0000000000000000000000000001.) This member is equivalent to the Visual Basic constant vbDecimal.

Double Double Double Double 5

Double. (-1.79769313486231E+308 through -4.94065645841247E-324 for negative values; 4.94065645841247E-324 through 1.79769313486231E+308 for positive values.) This member is equivalent to the Visual Basic constant vbDouble.

Empty Empty Empty Empty 0

Null reference. This member is equivalent to the Visual Basic constant vbEmpty.

Error Error Error Error 10

Exception

Integer Integer Integer Integer 3

Integer. (-2,147,483,648 through 2,147,483,647.) This member is equivalent to the Visual Basic constant vbInteger.

Long Long Long Long 20

Long. (-9,223,372,036,854,775,808 through 9,223,372,036,854,775,807.) This member is equivalent to the Visual Basic constant vbLong.

Null Null Null Null 1

Null object. This member is equivalent to the Visual Basic constant vbNull.

Object Object Object Object 9

Any type can be stored in a variable of type Object. This member is equivalent to the Visual Basic constant vbObject.

Short Short Short Short 2

Short. (-32,768 through 32,767.)

Single Single Single Single 4

Single. (-3.402823E+38 through -1.401298E-45 for negative values; 1.401298E-45 through 3.402823E+38 for positive values.) This member is equivalent to the Visual Basic constant vbSingle.

String String String String 8

String. (0 to approximately 2 billion Unicode characters.) This member is equivalent to the Visual Basic constant vbString.

UserDefinedType UserDefinedType UserDefinedType UserDefinedType 36

User-defined type. Each member of the structure has a range determined by its data type and independent of the ranges of the other members. This member is equivalent to the Visual Basic constant vbUserDefinedType.

Variant Variant Variant Variant 12

Variant. This member is equivalent to the Visual Basic constant vbVariant.

Remarks

When you call the VarType function, you can use enumeration members in your code in place of the actual values.

The VariantType enumeration defines constants used to identify possible Variant types. The following table lists the VariantType enumeration members.

Applies to

See also