c#枚举数字转枚举
A variable of enum cannot have a private access specifier.
A variable of enum cannot have a protected access specifier.
A variable of enum cannot have a public access specifier.
We can define a variable of enum inside a class or a namespace.
Options:
Correct answer: 3
Only D
Only D statement is correct about enum.
枚举变量不能具有私有访问说明符。
枚举变量不能具有受保护的访问说明符。
枚举变量不能具有公共访问说明符。
我们可以在类或名称空间中定义enum变量。
选项:
正确答案:3
只有D
关于枚举,只有D语句是正确的。
int is a default underlying data type of enum.
We cannot print elements of enum in the form of string.
Every enum created in C#.Net is derived from Object class.
We need to use an implicit cast to convert enum type to an integral type.
Options:
Correct answer: 4
A and C
The A and C statements are correct about enum.
int是枚举的默认基础数据类型。
我们不能以字符串形式打印枚举元素。
在C#.Net中创建的每个枚举都是从Object类派生的。
我们需要使用隐式转换将枚举类型转换为整数类型。
选项:
正确答案:4
A和C
A和C语句关于枚举是正确的。
Correct answer: 1
Yes
Yes, we can declare an enum inside the class.
Correct answer: 2
No
No, it is not true.
Correct answer: 1
Yes
Yes, it is true.
翻译自: https://www.includehelp.com/dot-net/csharp-enumeration-aptitude-questions-and-answers-2.aspx
c#枚举数字转枚举