public static bool ContainsValue(this IDictionary source, string key, string value) { return(source.Contains(key) && source[key].ToString().Equals(value, StringComparison.CurrentCultureIgnoreCase)); }
/// <summary> /// Determines whether the dictionary contains a specific value. /// </summary> /// <param name="item">The object to locate in the dictionary.</param> /// <returns>true if item is found in the dictionary; otherwise, false.</returns> public bool Contains(KeyValuePair <TKey, TValue> item) { return(dictionary.Contains(item)); }