[英]i want to return List<DictionaryClass<string,string>> from web service but getting error for IDictionary
[WebMethod]
public List<DictionaryClass<string,string>> GetDataByModuleDictionary(string ModuleName)
{
return BAL_GeneralService.GetDataByModuleDictionary(ModuleName);
}
here i m getting the following error...
The type DictionaryClass`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] is not supported because it implements IDictionary.
XMLSerializer无法序列化实现IDictionary的类。 要解决此问题,您需要在DictionaryClass中实现System.Xml.Serialization.IXmlSerializable。 有关更多信息,请参见此处 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.