Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

VariantType Enumeration

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

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
public enum VariantType
Member nameDescription
ArrayArray. This member is equivalent to the Visual Basic constant vbArray.
BooleanBoolean. (True or False.) This member is equivalent to the Visual Basic constant vbBoolean.
ByteByte. (0 through 255.) This member is equivalent to the Visual Basic constant vbByte.
CharChar. (0 through 65535.) This member is equivalent to the Visual Basic constant vbChar.
CurrencyCurrency. This member is equivalent to the Visual Basic constant vbCurrency.
DataObjectDataObject.
DateDate. (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.
DecimalDecimal. (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.
DoubleDouble. (-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.
EmptyNull reference. This member is equivalent to the Visual Basic constant vbEmpty.
ErrorSystem.Exception
IntegerInteger. (-2,147,483,648 through 2,147,483,647.) This member is equivalent to the Visual Basic constant vbInteger.
LongLong. (-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.
NullNull object. This member is equivalent to the Visual Basic constant vbNull.
ObjectAny type can be stored in a variable of type Object. This member is equivalent to the Visual Basic constant vbObject.
ShortShort. (-32,768 through 32,767.)
SingleSingle. (-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.
StringString. (0 to approximately 2 billion Unicode characters.) This member is equivalent to the Visual Basic constant vbString.
UserDefinedTypeUser-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.
VariantVariant. This member is equivalent to the Visual Basic constant vbVariant.

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.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.