PERFORMANCE ANALYSIS OF VARIANT DATA TYPE IN VISUAL BASIC

In VB2.0 and higher version, Variant is a default data type. The Variant is a special data type of Visual Basic that can contain numeric, string, or date data types. A Variant can also contain the special values Empty, Error, and Null. The Variant data type allows us to store most types of data. We don′t have to convert between these data types if they are assigned as Variant variables, for the Visual Basic automatically performs any necessary conversion depending on the context. We can use the Variant data type in the place of any data type to work with data in a more flexible way. Although it is flexible, it needs larger storage room and has slower computing efficiency than that other data types do. It should thus be used restrainedly.