How to: Hold More Than One Value in a Variable (Visual Basic)
Updated: July 20, 2015
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
A variable holds more than one value if you declare it to be of a composite data type.
Composite Data Types include structures, arrays, and classes. A variable of a composite data type can hold a combination of elementary data types and other composite types. Structures and classes can hold code as well as data.
Determine what composite data type you want to use for your variable.
If the composite data type is not already defined, define it so that your variable can use it.
Declare your variable with a
Follow the variable name with an
Askeyword with the name of the appropriate composite data type.