Answer:
HashTable ht = new HashTable();
ht.Add(1,"A");
ht.Add(2,"B");
ht.Add(3,"C");
foreach(DictionaryEntry de in ht)
{
Console.WriteLine(string.Format("Key : {0} Value: {1}", de.Key.ToString(),de.Value.ToString()));
}
Asked In: Preliminary Technical Written Test |
Alert Moderator