Search

Hashtable

the Hashtable is a lookup data structure that uses a hash code to find elements quickly. The newer Dictionary collection is usually more appropriate for programs when available.
using System;
using System.Collections;

class Program
{
    static void Main()
    {
 Hashtable table = new Hashtable();
 table["one"] = 1;
 table["two"] = 2;

 // ... Print value at key.
 Console.WriteLine(table["one"]);
    }
}