• hashtable的简单应用


           Hashtable ht = new Hashtable();

            public Form1()
            {
                InitializeComponent();
            }

            private void Form1_Load(object sender, EventArgs e)
            {
                ht.Add("北京", "010");
                ht.Add("上海", "021");
                ht.Add("广州", "020");
            }

            private void button1_Click(object sender, EventArgs e)
            {
                foreach (DictionaryEntry a in ht)
                {
                    string msg = "Key=" + a.Key.ToString() + " Value=" + a.Value.ToString();

                    this.listBox1.Items.Add(msg);
                }
            }

  • 相关阅读:
    20210603
    20210602
    20210601
    20210531-已编辑
    2021053101
    操作系统笔记(一)
    尘埃落定,扬帆起航
    RTL级低功耗设计
    关于毛刺
    电路级拾珍
  • 原文地址:https://www.cnblogs.com/LongHuaiYu/p/5776743.html
Copyright © 2020-2023  润新知