Enumerations Overview (Visual Basic)
Enumerations provide a convenient way to work with sets of related constants and to associate constant values with names. For example, you can declare an enumeration for a set of integer constants associated with the days of the week, and then use the names of the days rather than their integer values in your code.
Tasks involving Enumerations
The following table lists common tasks involving enumerations.
To do this | See |
---|---|
Find a pre-defined enumeration | Constants and Enumerations |
Declare an enumeration | How to: Declare an Enumeration |
Fully qualify an enumeration's name | Enumerations and Name Qualification |
Refer to an enumeration member | How to: Refer to an Enumeration Member |
Iterate through an enumeration | How to: Iterate Through An Enumeration in Visual Basic |
Determine the string associated with an enumeration | How to: Determine the String Associated with an Enumeration Value |
Decide when to use an enumeration | When to Use an Enumeration |
See also
Работете съвместно с нас в GitHub
Източникът за това съдържание може да бъде намерен в GitHub, където можете също да създавате и преглеждате проблеми и да изтегляте искания. За повече информация вижте нашето ръководство за сътрудник.
Обратна връзка
https://aka.ms/ContentUserFeedback.
Очаквайте скоро: През цялата 2024 г. постепенно ще отстраняваме проблемите в GitHub като механизъм за обратна връзка за съдържание и ще го заменим с нова система за обратна връзка. За повече информация вижте:Подаване и преглед на обратна връзка за