What is the output for the below given program?
public enum WeekDays
public class Demo
public static void Main()
Every enumerator members is treated as a constant , every constant must contains an underlying value . For getting underlying value of enum member use explicit conversion. The default value for the first enum member will be 0. Enum members values will be incremented by one by taking base value as the previous member value. Hence we get Monday value as 1.
Back To Top