Friday, January 4, 2008

IDictionary

Hashtable ht = new Hashtable();
ht.Add(1, "bala");
ht.Add(2, "bala1");
IDictionary idic = (IDictionary)ht;
foreach (DictionaryEntry de in idic)
{
Response.Write(de.Key);
Response.Write(de.Value);
Response.Write("
");
}

out put

2bala1
1bala