Consider the code above and realize that any enumerated value not specifically processed by a case statement is instead processed by the default statement.
研究以上代码可以看出,任何没有被case语句处理的枚举值都会被default语句处理。
This is a great use-case for a Map, in which each key of the Map is one of these enumerated values, and each value is the error message for that key. Listing 10 illustrates how this works.
这是映射(map)的一个绝好用例,在这里,每个映射(map)的键都是一个枚举值,而每个值都是键的错误信息。
We can see that our Breed enumerated type contains several variables of type Value, as in the following example.
你可以看到我们的Breed枚举类型包含了几种Value 类型的值,像下面的例子所展示的。
The administrator can specify that Data Sensitivity attribute applies only to terms, and chooses the enumerated valid value type entering the Numbers 1 through 5 as valid values.
管理员可以指定DataSensitivity属性只应用于术语,并选择数字1到5的枚举类型作为有效值。
The enumerated types enable us to select one value from multiple options.
枚举类型使我们能够从多项选项中选择一个值。
How can I assign an enumerated type value to a variable?
我怎么可以指定枚举类型的值给一个变量?
Perhaps its enumerated Vu Thi counts of great documentary value, in the final nail in the history of the Vu Thi contributed shame.
或许其历数武氏罪状极具文献价值,在最终将武氏钉于历史的耻辱柱上功不可没。
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
把一个或更多列举型别常数的名称或数字数值的字串表示转换为一个对等列举型别物件。
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
把一个或更多列举型别常数的名称或数字数值的字串表示转换为一个对等列举型别物件。
应用推荐