public static class ClubTypeToStringKey
{
private static Dictionary<CLUB_TYPE, StringTableKeys> typeTostringKey
= new Dictionary<CLUB_TYPE, StringTableKeys>();
public static StringTableKeys ToStringKey(this CLUB_TYPE type)
{
if(typeTostringKey.ContainsKey(type))
{
return typeTostringKey[type];
}
StringTableKeys result;
if (Enum.TryParse(type.ToString(), out result))
{
typeTostringKey.Add(type, result);
}
return typeTostringKey[type];
}
}