سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top