NameValueCollection not available from System.Collections.Specialized

一世执手 提交于 2019-12-02 13:32:00

问题


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.

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.

Can someone help me to use NameValueCollection?

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


回答1:


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



来源:https://stackoverflow.com/questions/19348158/namevaluecollection-not-available-from-system-collections-specialized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!