private static Dictionary<string, string> HashtableToDictionary(Hashtable table) { return table .Cast<DictionaryEntry>() .ToDictionary(kvp => (string)kvp.Key, kvp => (string)kvp.Value); }