C# Programming - Enumerations - Discussion
Discussion Forum : Enumerations - General Questions (Q.No. 3)
3.
Which of the following statements is true about an enum used in C#.NET?
Discussion:
4 comments Page 1 of 1.
Ataman said:
4 years ago
@Nagaraju Kuricheti,
You did it in an explicit way.
Explicit casting.
double myDouble = 9.78;
int myInt = (int) myDouble;
You did it in an explicit way.
Explicit casting.
double myDouble = 9.78;
int myInt = (int) myDouble;
Nagaraju Kuricheti said:
8 years ago
Yes, option A is also true.
We need to convert it implicitly.
int a=(int)enum_name.Namedintegerconstant;.
We need to convert it implicitly.
int a=(int)enum_name.Namedintegerconstant;.
Rama Lanka said:
9 years ago
But also option A is true. Isn't it?
Bhupendra singh said:
1 decade ago
We can define a enum at both place, either inside a namespace or inside class, it will work properly.
Option b, d, e is wrong because we can use access modifier with enum.
Option b, d, e is wrong because we can use access modifier with enum.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers