I want a Web Service in C# that returns a Dictionary, according to a search:
Dictionary<int, string> GetValues(string search) {}
The Web Service compiles fine, however, when i try to reference it, i get the following error: ‘is not supported because it implements IDictionary.’
¿What can I do in order to get this working?, any ideas not involving return a DataTable?
This article has a method to serialize IDictionaries. Look for ‘ I’ve noticed that XmlSerializer won’t serialize objects that implement IDictionary by default. Is there any way around this?’ about 2/3 the way down the page.