private static Dictionary <string, int> KeyWord;// = new Dictionary<string, int>() static KeyWords() { KeyWord = new Dictionary <string, int>(); int i = 0; foreach (KW item in KW.GetValues(typeof(KW))) { string str = item.ToString().Substring(2).ToLower(); KeyWord.Add(str, i); i++; } }