-
-
Save ellenia/3bf547b09b72e5a51c1a993dba61c6ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace VacationDays | |
{ | |
enum Days | |
{ | |
Sunday, | |
Monday, | |
Tuesday, | |
Wednesday, | |
Thursday, | |
Friday, | |
Saturday | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.Write("Please enter your first choice for vacation: "); | |
Days day1 = (Days)Enum.Parse(typeof(Days), Console.ReadLine()); | |
Console.Write("Please enter your second choice for vacation: "); | |
Days day2 = (Days)Enum.Parse(typeof(Days), Console.ReadLine()); | |
Console.WriteLine(); | |
Console.WriteLine("You selected {0}:{1} and {2}:{3}", day1, (int)day1, day2, (int)day2); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment