Switch / Select Case Assistant for Enums
|Top Previous Next|
C# VB.NET VB6 VBA
The Switch / Select Case Assistant for Enums feature allows you to quickly create the block of case statements for an enum expression.
MZ-Tools offers the following ways to show the Switch / Select Case Assistant for Enums:
When you type a statement such as:
[VB.NET / VB / VBA]
Select Case dayOfWeek
and you invoke this assistant the following window is shown:
In this window, you can choose the values of the enum expression which require a separate case statement. If you leave enum values not selected, a default (C#) or Case Else (VB.NET / VB / VBA) statement is added.
You can also select if you want to use full names for the enum values or not, and the order of the case statements.
Optionally you can even compose a template to be used for each individual case statement. Such template can include predefined variables such as the name of the enum item or parent enum (with normal case, upper case, underscores, etc.).