e mërkurë, 16 janar 2008

Enums - some more basics

Consider enum below
enum test:int
{
a,
b,
c = 5,
d
}

What will the following code display

static void Main(string[] args)
{
Console.WriteLine((int)test.a);
Console.WriteLine((int)test.b);
Console.WriteLine((int)test.c);
Console.WriteLine((int)test.d);
Console.ReadKey();
}

1 koment:

Anonymous tha...

Could you post more .NET 2005 questions, that wud help us a lot....