vikash kumar

vikash kumar

  • NA
  • 18
  • 4.1k

Output sequence of Enum in c#

Apr 26 2016 9:03 AM
Here is my enum with which i am just confused with output. Please explain its execution sequence.
 
public enum DayofWeek
{
  Monday=1,Tuesday,Wednesday=1,Thursday,Friday=2,Saturday
}
 
static void Main(string[] args)
{

  string[] values = Enum.GetNames(typeof(DayofWeek));

foreach (string s in values)
{

  Console.WriteLine(s);

}
}

Answers (2)