live user chart 221 users on this page
0 views

Verified Question

Which of the following is the correct output for the C#.NET code snippet given below
enum color
{
red,
green,
blue
}
color c = color.red;
Type t;
t = c.GetType();
string[ ]str;
str = Enum.GetNames(t);
Console.WriteLine(str[ 0 ]);

Answer is "Red"

Comments and Discussions

You don't need to login to post your comment

Sierra
Sierra • via iOS
🌐 India

hmm, where is the explanation

Abigail
Abigail • via iOS
🌐 India

Please please explain this answer to me