StringDictionary
Use the
StringDictionary
type to map string values to other
string values. This sample process expands abbreviated names of week days:
string ExpandName(string dayOfWeek)
{
StringDictionary expandedNames = CreateStringDictionary();
expandedNames["mon"] = "Monday";
expandedNames["tue"] = "Tuesday";
expandedNames["wed"] = "Wednesday";
expandedNames["thu"] = "Thursday";
expandedNames["fri"] = "Friday";
expandedNames["sat"] = "Saturday";
expandedNames["sun"] = "Sunday";
return expandedNames[ToLower(dayOfWeek)];
}