Dictionary[]是什么意思
题目
Dictionary[]是什么意思
string recCode = null;
Dictionary dic = new Dictionary();
dic.Add("0", "失败");
dic.Add("2", "处理中");
recCode = dic[resultCode];
最后这一句:recCode = dic[resultCode];这是什么用法什么意思?忘高手赐教!
答案
Dictionary 是字典的意思,是一种键-值数据存储.
recCode = dic[resultCode];就是取出键为resultCode的值赋给recCode
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
热门考点
- 设当x趋向于0 时,函数 f(x)=x-sinx与g(x) =ax*n是等价无穷小,则常数a,n 的值为多少
- How many ways does the writer give us to deal with our porblem?
- If it were not for literature,the well known writer J.K.Rowling (would have gone)nowhere in life.
- 一个朋友的说说,谁能翻译一下:People are not so honest as they once were.The temptation to steal is greater than er
- I usually go to the cimema with my parents at weekends就画线部分提问
- 把一个圆剪、切、拼成一个近似的长方形,已知长方形的长比宽多8.56厘米,圆的面积是多少平方厘米?
- 锇在常态下的密度为多少?
- -27(X-1)的三次=8
- 某商品的进价为每件30元现在的售价为每件40元,每星期可卖出150件,如果没见涨价2元,售价每件不高于48元 那
- 中国在北半球还是南半球,东半球还是西半球