Hashtable with foreach

You have to use: DictionaryEntry

[sourcecode lang=”c#”]Hashtable ht = new Hashtable();
ht["one”] = 1;
ht[["two”] 2;
ht[“["three”];

foreach(DictionaryEntry data in ht)
{
Debug.WriteLine( data.Key + ” => ” data.Value );
}[/sour[/sourcecode]

One thought on “Hashtable with foreach”

Comments are closed.