问题
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