NameValueCollection中无法从System.Collections.Specialized [英] NameValueCollection not available from System.Collections.Specialized

查看:236
本文介绍了NameValueCollection中无法从System.Collections.Specialized的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VS 2012例preSS为Windows Phone,我同时使用进口系统 System.Collections.Specialized ,但是我还是想用的时候发生错误的NameValueCollection

In VS 2012 Express for Windows Phone, I am using imports of both System and System.Collections.Specialized, but I still get an error when trying to use NameValueCollection.

找对象浏览器,我看到它嵌套在System.dll中,但也有几个版本的系统DLL上市 - 其中一些没有它。我得到自动完成匹配的System.dll中的现有的项目,而不 的NameValueCollection ,所以我想我需要理清哪些System.dll中被使用,但我不知道如何做到这一点。

Looking in the Object browser, I see it nested within System.dll, but there are several versions of the System dll listed - some of which do not have it. What I get in auto-complete matches the available items in the System.dll without NameValueCollection, so I'm thinking I need to sort out which System.dll is being used, but I am not sure how to do so.

有人可以帮助我使用的NameValueCollection

该系统的版本我有: 2.0.0.0(有它) - .NET 2,3,3.5 2.0.5.0运行2.0.5xxx(没有的话)的Silverlight 4 2.0.5.0运行4.0.3xxx(没有的话)的Windows Phone 8 4.0.0.0(有它) - .NET 4.0

The System versions I have are: 2.0.0.0 (has it) - .NET 2,3,3.5 2.0.5.0 Runtime 2.0.5xxx (does not have it) Silverlight 4 2.0.5.0 Runtime 4.0.3xxx (does not have it) Windows Phone 8 4.0.0.0 (has it) - .NET 4.0

推荐答案

的NameValueCollection 不适用于Windows Phone的。您可以使用词典<字符串,字符串> 而不是

NameValueCollection is not available for Windows Phone. You can use Dictionary<string, string> instead.

这篇关于NameValueCollection中无法从System.Collections.Specialized的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆