示例#1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to hashtable demo");
            MyMapNode <string, string> hash = new MyMapNode <string, string>(5);

            hash.Add("0", "Paranoids");
            hash.Add("1", "are");
            hash.Add("2", "not");
            hash.Add("3", "paranoids");
            hash.Add("4", "beacuse");
            hash.Add("5", "they");
            hash.Add("6", "are");
            hash.Add("7", "paranoid");
            hash.Add("8", "but");
            hash.Add("9", "because");
            hash.Add("10", "they");
            hash.Add("11", "keep");
            hash.Add("12", "putting");
            hash.Add("13", "themselves");
            hash.Add("14", "deliberately");
            hash.Add("15", "into");
            hash.Add("16", "paranoid");
            hash.Add("17", "avoidable");
            hash.Add("18", "situations");
            hash.GetFrequency("avoidable");
            hash.RemoveValue("avoidable");
            hash.GetFrequency("avoidable");
            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to hashtable demo");
            MyMapNode <string, string> hash = new MyMapNode <string, string>(5);

            hash.Add("0", "To");
            hash.Add("1", "be");
            hash.Add("2", "or");
            hash.Add("3", "not");
            hash.Add("4", "to");
            hash.Add("5", "be");
            hash.GetFrequency("or");
            Console.ReadKey();
        }