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
];
}
}
}
查看全文
相关阅读:
验证或是提示字段请求值
正则表达式模式
Linux下squid代理缓存服务环境部署
memcached缓存知识简单梳理
MySQL 读写分离方案-Amoeba环境部署记录
linux系统终端命令提示符设置(PS1)记录
Gitlab快速部署及日常维护(社区版RPM包方式安装)
Linux下检测IP地址冲突及解决方法
Linux如何挂载Windows下的共享文件
定时备份Windows文件到Linux服务器上(Rsync)
原文地址:https://www.cnblogs.com/leeolevis/p/1383135.html
最新文章
iOS中的二维数组
byte[]与各种数据类型互相转换示例
Android自定义view-CircleSeekbar
MVC应用jQuery动态产生数据
jQuery选择器遇上一些特殊字符
MVC应用程序JsonResult()的练习
MVC删除操作前confirm提示
匹配与显示中文说明
_ViewStart文件应用
多表关联解决数据在MVC显示
热门文章
MVC应用程序结构与规划
Html.DropDownListFor练习(2)
Html.DropDownListFor练习
MVC的部分视图(Partial View)
MVC母版页_Layout.cshtml
自定义MVC的Helper扩展方法
MVC 5 Strongly Typed Views(强类型视图)
MVC 5使用ViewBag(对象)显示数据
MVC 5使用ViewData(模型)显示数据
MVC 5使用ViewData(对象)显示数据
Copyright © 2011-2022 走看看