kvigor
asked on
Enumeration Explanation of {0}
I was wondering I've seen enumeration values accessed and output in two ways one was by array/element notation and the other which included {0}, {1} could someone give me a detailed explanation of this from the following code example.
I understand that there's some value swopping going on but I'm not sure I understand why. I've search msdn but to no avail.
I understand that there's some value swopping going on but I'm not sure I understand why. I've search msdn but to no avail.
using System;
public class EnumTest
{
enum Days {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};
static void Main()
{
int x = (int)Days.Sun;
int y = (int)Days.Fri;
Console.WriteLine("Sun = {0}", x);
Console.WriteLine("Fri = {0}", y);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER