VariantType VariantType VariantType VariantType Enum

定义

指示由 VarType 函数返回的变量对象的类型。Indicates the type of a variant object, returned by the VarType function.

public enum class VariantType
public enum VariantType
type VariantType = 
Public Enum VariantType
继承

字段

Array Array Array Array 8192

数组。Array. 此成员等效于 Visual Basic 常量 vbArrayThis member is equivalent to the Visual Basic constant vbArray.

Boolean Boolean Boolean Boolean 11

BooleanBoolean. TrueFalse。)此成员等效于 Visual Basic 常量 vbBoolean(True or False.) This member is equivalent to the Visual Basic constant vbBoolean.

Byte Byte Byte Byte 17

ByteByte. (0 到 255。)此成员等效于 Visual Basic 常量 vbByte(0 through 255.) This member is equivalent to the Visual Basic constant vbByte.

Char Char Char Char 18

CharChar. (0 到 65535。)此成员等效于 Visual Basic 常量 vbChar(0 through 65535.) This member is equivalent to the Visual Basic constant vbChar.

Currency Currency Currency Currency 6

Currency。Currency. 此成员等效于 Visual Basic 常量 vbCurrencyThis member is equivalent to the Visual Basic constant vbCurrency.

DataObject DataObject DataObject DataObject 13

DataObject。DataObject.

Date Date Date Date 7

DateDate. (0001 年 1 月 1 日午夜 0:00:00 到 9999 年 12 月 31 日晚上 11:59:59。)此成员等效于 Visual Basic 常量 vbDate(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

DecimalDecimal. (0 到 +/-79,228,162,514,264,337,593,543,950,335,不带小数点;0 到 +/-7.9228162514264337593543950335,小数点右侧 28 位小数;最小的非零数字为 +/-0.0000000000000000000000000001。)此成员等效于 Visual Basic 常量 vbDecimal(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

DoubleDouble. (对于负值,从 -1.79769313486231E+308 到 -4.94065645841247E-324;对于正值,从 4.94065645841247E-324 到 1.79769313486231E+308。)此成员等效于 Visual Basic 常量 vbDouble(-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 引用。Null reference. 此成员等效于 Visual Basic 常量 vbEmptyThis member is equivalent to the Visual Basic constant vbEmpty.

Error Error Error Error 10

Exception

Integer Integer Integer Integer 3

IntegerInteger. (–2,147,483,648 到 2,147,483,647。)此成员等效于 Visual Basic 常量 vbInteger(-2,147,483,648 through 2,147,483,647.) This member is equivalent to the Visual Basic constant vbInteger.

Long Long Long Long 20

LongLong. (-9,223,372,036,854,775,808 到 9,223,372,036,854,775,807。)此成员等效于 Visual Basic 常量 vbLong(-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 对象。Null object. 此成员等效于 Visual Basic 常量 vbNullThis member is equivalent to the Visual Basic constant vbNull.

Object Object Object Object 9

Object 类型的变量中可存储任何类型。Any type can be stored in a variable of type Object. 此成员等效于 Visual Basic 常量 vbObjectThis member is equivalent to the Visual Basic constant vbObject.

Short Short Short Short 2

ShortShort. (–32,768 到 32,767。)(-32,768 through 32,767.)

Single Single Single Single 4

SingleSingle. (对于负值,从 -3.402823E+38 到 -1.401298E-45;对于正值,从 1.401298E-45 到 3.402823E+38。)此成员等效于 Visual Basic 常量 vbSingle(-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

StringString. (0 到大约 20 亿个 Unicode 字符。)此成员等效于 Visual Basic 常量 vbString(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. 此成员等效于 Visual Basic 常量 vbUserDefinedTypeThis member is equivalent to the Visual Basic constant vbUserDefinedType.

Variant Variant Variant Variant 12

VariantVariant. 此成员等效于 Visual Basic 常量 vbVariantThis member is equivalent to the Visual Basic constant vbVariant.

注解

调用VarType函数时, 可以在代码中使用枚举成员来代替实际值。When you call the VarType function, you can use enumeration members in your code in place of the actual values.

枚举定义用于标识可能Variant类型的常量。 VariantTypeThe VariantType enumeration defines constants used to identify possible Variant types. 下表列出VariantType了枚举成员。The following table lists the VariantType enumeration members.

适用于

另请参阅