Exercise
Hast Table - Dictionary
Objetive
Submit your dictionary here using a hash table.
Example Code
using System;
using System.Collections;
namespace TableHash
{
class Program
{
static void Main(string[] args)
{
Hashtable myList = new Hashtable();
myList.Add("white", "blanco");
myList.Add("black", "negro");
Console.WriteLine("The size is: " + myList.Count);
Console.WriteLine("Contenido:");
IDictionaryEnumerator miEnumerador = myList.GetEnumerator();
while (miEnumerador.MoveNext())
Console.WriteLine("{0} = {1}", miEnumerador.Key, miEnumerador.Value);
if (myList.ContainsKey("orange"))
{
Console.WriteLine(myList["orange"]);
}
}
}
}