Which of the following will be the correct output for the C#.NET code snippet given below?
enum color : int
{
red = - green,
blue
}
Console.Write( (int) color.red + ", ");
Console.Write( (int) color.green + ", ");
Console.Write( (int) color.blue );Which of the following statements is correct about an enum used in C#.NET?
An enum that is declared inside a class, struct, namespace or interface is treated as public.
Which of the following statements are correct about an enum used in C#.NET?
Which of the following statements is correct about the C#.NET code snippet given below?
enum per
{
married,
unmarried,
divorced,
spinster
}
per.married =
Console.WriteLine(per.unmarried);Which of the following is the correct output for the C#.NET code snippet given below?
enum color: int
{
red,
green,
blue =
cyan,
magenta =
yellow
}
Console.Write( (int) color.green + ", " );
Console.Write( (int) color.yellow );An enum can be declared inside a class, struct, namespace or interface.
Which of the following CANNOT be used as an underlying datatype for an enum in C#.NET?
Which of the following statements are correct about an enum used inC#.NET?
Which of the following statements are correct about enum used in C#.NET?
Which of the following statements is correct about the C#.NET code snippet given below?
int a =
int b =
int c =enum color: byte
{
red = a,
green = b,
blue = c
}Which of the following statements is correct about the C#.NET code snippet given below?
enum color : byte
{
red = green = blue =}Which of the following statements is true about an enum used in C#.NET?
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 ]);Which of the following is the correct output for the C#.NET code snippet given below?
enum color
{
red,
green,
blue
}
color c;
c = color.red;
Console.WriteLine(c);Which of the following statements are correct about the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
(
class Sample
{
private enum color : int
{
red,
green,
blue
}
public void fun()
{
Console.WriteLine(color.red);
}
}
class Program
{
static void Main(string[ ] args)
{
// Use enum color here
}
}
}
Which of the following statements are correct about an enum used inC#.NET?