• C# hashTable的使用《收藏》


    方法一
     foreach (System.Collections.DictionaryEntry de in objHasTab)
    {
        //注意HastTable内存储的默认类型是object,需要进行转换才可以输出
        Console.WriteLine(de.Key.ToString());
        Console.WriteLine(de.Value.ToString());
    }

    方法二
    System.Collections.IDictionaryEnumerator enumerator = objHashTablet.GetEnumerator();
    while (enumerator.MoveNext())
    {
        Console.WriteLine(enumerator.Key);         // Hashtable关健字
        Console.WriteLine(enumerator.Value);      // Hashtable值
    }

  • 相关阅读:
    文件路径与操作系统
    试验10
    shiyan9
    sql
    shiyan8
    iostream
    shiyan7
    CDMA
    试验6
    试验5
  • 原文地址:https://www.cnblogs.com/kingwangzhen/p/1611410.html
Copyright © 2020-2023  润新知