Create a Hashtable using a case-insensitive code provider and a case-insensitive comparer, based on the InvariantCulture.
using System;
using System.Collections;
using System.Globalization;
public class SamplesHashtable {
public static void Main() {
Hashtable myHT3 = new Hashtable( CaseInsensitiveHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant );
myHT3.Add("FIRST", "Hello");
myHT3.Add("SECOND", "World");
}
}
Related examples in the same category