Converting Strings to Enum Values

public enum DaysOfWeek
{
Sunday = 1,
Monday = 2,
Tuesday = 3,
Wednesday = 4,
Thursday = 5,
Friday = 6,
Saturday = 7
}
[/CODE]

[CODE]string CurrentDayString = "Sunday";
DaysOfWeek CurrentDay = DaysOfWeek.Monday;
try
{
CurrentDay = (DaysOfWeek)Enum.Parse(typeof(DaysOfWeek), CurrentDayString);} catch
{
// Invalid enumeration value
}

switch (CurrentDay)
{
case DaysOfWeek.Saturday:
case DaysOfWeek.Sunday:
// What are you doing working on the weekend
break;

default:
// Get back to work
break;
}