Preamble: I would advise against using an enum item name to represent data (you can get the string name of a given enum value and type). I would also advise using implicitly assigned enum values as subtle changes such as adding or removing an enum item may create subtle incompatible changes/bugs.
In this case I may just create a map from an enum-value to a string format, such as:
public enum WebWizDateFormat
{
DDMMYY = 1,
MMDDYY = 2,
YYDDMM = 3,
YYMMDD = 4,
// but better, maybe, as this abstracts out the "localization"
// it is not mutually exclusive with the above
// however, .NET *already* supports various localized date formats
// which the mapping below could be altered to take advantage
ShortUS = 10, // means "mm/dd/yy",
LongUK = ...,
}
public IDictionary<string,string> WebWizDateFormatMap = new Dictionary<string,string> {
{ WebWizDateFormat.DDMMYY, "dd/mm/yy" },
// "localized" version, same as MMDDYY
{ WebWizDateFormat.ShortUS, "mm/dd/yy" },
... // define for -all-
};
// to use later
string format = WebWizDateFormatMap[WebWizDateFormat.ShortUS];
Happy coding