如何获取集合类Dictionary中所有key的值(在线等!!!) 如题! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Values<--------值集合 Dictionary<string, string> _Dictionary = new Dictionary<string, string>(); foreach(string _Key in _Dictionary.Keys) { _Key } dic.keys<--------key集合单个获取可以foreach如果你的key是string 类型 foreache(string s in dic.keys){ console.writeline(s);} Dictionary <string, string> dic = new Dictionary <string, string>(); dic.keys 这个我刚刚试过,没有问题 _Key就是你需要的键值 Dictionary<string, string> dic= new Dictionary<string, string>();foreach (var item in dic.Values){//Do sth.} Dictionary<string, string> dic= new Dictionary<string, string>();foreach (var item in dic.Values){//Do sth.} 一个很简单的信息打印,接收部门使用的是checkedListBox1,想用水晶报表打印,大侠们帮完善代码100分散~~~有图 正则表达式去匹配url的值,就剩下最后一个 datagridview填充视图问题 怎样用 .NET实现邮件发送 簡單問題,但很急!!! c# 主从表绑定 如何获取对话框问题 菜鳥問題,如何實現excel的分頁打印? 我用SystemInformation.network测试计算机是否连网为什么返回的总是true,可是我根本没有连网呀,连网线都没插 如何提取dataset中的数据?? WPF中怎么遍历文件夹中的所有图片然后显示出来 不支持关键字instance
foreach(string _Key in _Dictionary.Keys)
{
_Key
}
如果你的key是string 类型 foreache(string s in dic.keys)
{
console.writeline(s);
}
dic.keys
这个我刚刚试过,没有问题 _Key就是你需要的键值
foreach (var item in dic.Values)
{
//Do sth.
}
foreach (var item in dic.Values)
{
//Do sth.
}