zoukankan
html css js c++ java
c#遍历HashTable
C# 代码
using
System;
using
System.Collections.Generic;
using
System.Text;
using
System.Collections;
namespace
GetSpec
...
{
class
HashTableDemo
...
{
public
string
Get()
...
{
Hashtable hashTable
=
new
Hashtable();
hashTable.Add(
1
,
"
wuyi
"
);
hashTable.Add(
2
,
"
sky
"
);
System.Windows.Forms.MessageBox.Show((
string
)hashTable[
1
]);
foreach
(DictionaryEntry de
in
hashTable)
...
{
System.Windows.Forms.MessageBox.Show(de.Key.ToString());
System.Windows.Forms.MessageBox.Show(de.Value.ToString());
}
System.Collections.IDictionaryEnumerator enumerator
=
hashTable.GetEnumerator();
while
(enumerator.MoveNext())
...
{
System.Windows.Forms.MessageBox.Show(enumerator.Key.ToString());
System.Windows.Forms.MessageBox.Show( enumerator.Value.ToString());
}
return
(
string
)hashTable[
1
];
}
}
}
查看全文
相关阅读:
codevs 1160 蛇形矩阵
进程同步-进程内部也需要锁
进程间通讯-3(Manager)-实现数据的同时修改
进程间通讯-2(pipe)
python 中的queue 与多进程--待继续
进程间通讯-1-传递函数的方法
多进程
queue队列
python-输出颜色显示
python深浅copy-转自EVA的博客
原文地址:https://www.cnblogs.com/leeolevis/p/1383135.html
最新文章
Bzoj 1001: [BeiJing2006]狼抓兔子(最小割)
HDU 1512 Monkey King(左偏堆)
P1402 酒店之王
P1143 进制转换
P1136 迎接仪式
#505. 「LibreOJ β Round」ZQC 的游戏
网络流填坑
P3381 【模板】最小费用最大流
P3410 拍照
Bzoj 1280: Emmy卖猪pigs
热门文章
P1361 小M的作物
P2486 [SDOI2011]染色
P1559 运动员最佳匹配问题
图论——二分图
P2822 组合数问题
图的连通性问题之连通和最小环——Floyd算法
P1250 种树
P1508 Likecloud-吃、吃、吃
P2080 增进感情
P2386 放苹果
Copyright © 2011-2022 走看看