Write a program in C# Sharp to display the name of the days of a week.
Expected Output:
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
using System;
namespace Program
{
class Program
{
static void Main(string[] args)
{
foreach (var dw in Enum.GetValues(typeof(DayOfWeek)))
{
Console.WriteLine(dw.ToString());
}
}
}
}
Comments
Leave a comment