CSharp examples for System.Collections.Generic:IDictionary
Dictionary Contains Key Ignoring Case
using System.Linq; using System.Collections.Generic; using System;/*from w ww . jav a 2s. c om*/ public class Main{ public static bool DictionaryContainsKeyIgnoringCase(IDictionary<string, string> dictionary, string key) { if (dictionary.ContainsKey(key)) { return true; } foreach (var f in dictionary.Keys) { if (String.Equals(f, key, StringComparison.InvariantCultureIgnoreCase)) { return true; } } return false; } }