How to: Hold More Than One Value in a Variable (Visual Basic)
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.
To hold more than one value in a variable
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.
Define a structure with a Structure Statement.
Define an array with a Dim Statement.
Define a class with a Class Statement.
Declare your variable with a
Dim
statement.Follow the variable name with an
As
clause.Follow the
As
keyword with the name of the appropriate composite data type.
See also
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru