Look at the following code sample: enum Flavor { Vanilla, Strawberry, Chocolate }
Which of the following statements assigns the Flavor enumerated type value to The integer variable?
A) int n = Flavor.Strawberry.ToInteger() ;
B) int n = Strawberry.IntValue;
C) int n = (Flavor) Strawberry;
D) int n = (int) Flavor.Strawberry;
Correct Answer:
Verified
Q40: When the items in two data structures
Q41: Enumerators and enum variables can be compared
Q42: Character testing methods, such as char.IsLetter, return
Q43: The Substring method returns a string.
Q44: Because char variables can hold only one
Q46: In code, you can determine the number
Q47: You can convert an enumerator to its
Q48: If you pass an uppercase letter to
Q49: The _ is a container that can
Q50: You can use a subscript expression such
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents