|
- MyDictionary<string, int> myDictionary = new MyDictionary<string, int>();
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- myDictionary.Add("apple", 1);
- myDictionary["banana"] = 2;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- myDictionary.Clear();
- }
- private void button3_Click(object sender, EventArgs e)
- {
- myDictionary["banana"] = 2;
- myDictionary.Add("banana", 1);
- myDictionary.Add("banana", 10);
- int x = 0;
- }
复制代码 C#源代码下载链接:链接:https://pan.baidu.com/s/1Jah-yd6PyUHpJ5lKfp3t-A 提取码:2cbu
百度贴吧链接:C#字典重写【halcom中国吧】_百度贴吧 (baidu.com)
|
|