CaseInsensitiveComparer Class compares two objects for equivalence, ignoring the case of strings.
using System; using System.Collections; using System.Globalization; public class SamplesHashtable { public static void Main() { Hashtable myHT1 = new Hashtable(); myHT1.Add("FIRST", "Hello"); myHT1.Add("SECOND", "World"); myHT1.Add("THIRD", "3"); Hashtable myHT2 = new Hashtable( new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer() ); myHT2.Add("FIRST", "Hello"); myHT2.Add("SECOND", "World"); myHT2.Add("THIRD", "3"); } }