zoukankan
html css js c++ java
C#中hashtable如何嵌套遍历
嵌套hashtable的遍历取值怎么做
hastable中嵌套了hashtable,想用递归的方式把所有hashtable中的key和value取出来
foreach (DictionaryEntry objDE in table)
{
//代码
}这个是个该怎么写
解决方案 »
private void functionName(Hashtable table)
{
foreach (object obj in table.Keys)
{
// obj为key table[obj]为值,做想做的事 Hashtable subTable = table[obj] as Hashtable;
if (subTable != null)
{
functionName(table);
}
}
}
查看全文
相关阅读:
中国剩余定理(普通+扩展)
因子和(洛谷P1593)——约数和+分解质因数
暑假考试题6:problem 题(Catlan + dp + 组合数)
暑假考试题6:single 单(树上推理)
暑假考试题5:tree 最小生成树(最小生成树+倍增)
暑假考试题5:序列(分类讨论水题)
暑假考试题5:工作 work(贪心+二分)
暑假考试题4:砍树 cut(整除分块)
4.8 作业
面向对象编程
原文地址:https://www.cnblogs.com/qianxinxu/p/8566563.html
最新文章
P7514-[省选联考2021A/B卷]卡牌游戏【贪心】
P7518-[省选联考2021A/B卷]宝石【主席树,二分】
P5012-水の数列【并查集,RMQ】
P4234-最小差值生成树【LCT】
P4756-Added Sequence【斜率优化】
P4292-[WC2010]重建计划【长链剖分,线段树,0/1分数规划】
P4126-[AHOI2009]最小割【网络流,tarjan】
状压dp与数位dp与区间dp
六省联考2017总结
[JSOI2007]合金(凸包)
热门文章
[SCOI2009]游戏(dp)
[NOI2011]Noi嘉年华
[SHOI2008]循环的债务
[SHOI2008]汉诺塔
[SHOI2008]堵塞的交通traffic
[校内集训] 氵
[JSOI2008]魔兽地图DotR
[JSOI2008]最小生成树计数
暑假考试题7:number(二分+组合数)
求逆元的几种常用方法
Copyright © 2011-2022 走看看
private void functionName(Hashtable table)
{
foreach (object obj in table.Keys)
{
// obj为key table[obj]为值,做想做的事 Hashtable subTable = table[obj] as Hashtable;
if (subTable != null)
{
functionName(table);
}
}
}