using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ConsoleApplication17
{
    class Program
    {
        static void Main(string[] args)
        {
            Hashtable phones = new Hashtable();
            // Add items.
            phones.Add("John", "123-4567");
            phones.Add("Enju", "351-8765");
            phones.Add("Molly", "221-5678");
            phones.Add("James", "010-4077");
            phones.Add("Ahmed", "110-5699");
            phones.Add("Leah", "922-5699");            // Iterate through the collection.
            System.Console.WriteLine("Name\t\tNumber");
            foreach (DictionaryEntry de in phones)
            {
                System.Console.WriteLine("\t:(0),\t(1)",de.Key,de.Value);
            }
        }
    }
}Name            Number
        :(0),   (1)
        :(0),   (1)
        :(0),   (1)
        :(0),   (1)
        :(0),   (1)
        :(0),   (1)
请按任意键继续. . .