public static void Main()
WriteGreeting(TimeOfDay.Evening);
Console.WriteLine(Enum.Parse(typeof(TimeOfDay), "Morning"));
static void WriteGreeting(TimeOfDay timeOfDay)
Console.WriteLine("Good morning!");
case TimeOfDay.Afternoon:
Console.WriteLine("Good afternoon!");
Console.WriteLine("Good evening!");
Console.WriteLine("Case not found");
static void WriteGreeting(int timeOfDay)
Console.WriteLine("Good morning!");
Console.WriteLine("Good afternoon!");
Console.WriteLine("Good evening!");
Console.WriteLine("Case not found");