如下: 我想把产生的P1,P2,......累加到一个SumoutParam 中,如何实现,谢谢大侠讲解!
if (!svr.getCountryBasicInfo(inParam, out P1)) throw new ApplicationException(svr.ErrMsg); if (!svr.getCh_sjrs(inParam, out P2)) throw new ApplicationException(svr.ErrMsg);
NameValueCollection SumoutParam=new NameValueCollection();
下面如何操作,小弟才疏学浅 哪位大哥指点下啊
if (!svr.getCountryBasicInfo(inParam, out P1)) throw new ApplicationException(svr.ErrMsg); if (!svr.getCh_sjrs(inParam, out P2)) throw new ApplicationException(svr.ErrMsg);
NameValueCollection SumoutParam=new NameValueCollection();
下面如何操作,小弟才疏学浅 哪位大哥指点下啊
我这样写不对,哪位大哥赐教一下!
for(int i=0;i<P1.count;i++)
{
P.Add(P1[i]);
}
为什么不对啊?????
NameValueCollection p1 = new NameValueCollection();
p1.Add("a", "b");
p1.Add("c", "d");NameValueCollection p = new NameValueCollection();
for (int i = 0; i < p1.Count; i++)
{
p.Add(p1.Keys[i], p1[i]);
}
if (!svr.getCountryBasicInfo(inParam, ref P1)) throw new ApplicationException(svr.ErrMsg); if (!svr.getCh_sjrs(inParam, ref P2)) throw new ApplicationException(svr.ErrMsg);
然后累加p1,p2 就可以了 啊,谢谢大家,结贴了