日期:2014-05-18 浏览次数:20850 次
string a,b,c,d,e,f,name,age,address,code,retn,info,repage;
string source = "a=1&b=2&c=3&d=4&e=5&f=6&name=james&age=17&address=&code=-&retn=null&info=null&repage=%2Frz%2Frzsubmit.jsp"; var dict = (from x in source.Split('&') select new { k = x.Split('=')[0], v = HttpUtility.UrlDecode(x.Split('=')[1]) }).ToDictionary(x => x.k, x => x.v); string a = dict["a"], b = dict["b"], c = dict["c"], ...
------解决方案--------------------