enum Days { Sun, Mon, Tue, Wed, Thu, Fri, Sat };
static void Main(string[] args) {
int x = (int)Days.Tue;
Console.WriteLine(x); //Outputs 2
}
I have two questions:
Q1. I don't understand why we need to assign int x to Enum as Enum have default values starting with index 0?
Q2. What is the real life example usage of Enum?