I wrote an asmx service on one server1 and and asp.net/c# on another server2.
I want to transfer a dictionary<string,string> from srv1 to srv2.
I read Dictionary is not serializable and should be sent as List<KeyValuePair<string,string>>.
on srv2 I try to read the result but it’s of type:
KeyValuePairOfStringString[] result = response.GetTemplatesParamsPerCtidResult;
i try to retrieve the key,value but cannot unflat each element:
foreach (var pair in result)
{
// pair has just 4 generic methods: toString, GetHashCode,GetType,Equals
}
How do I do this? Is there anything I should change in my implementation?
TIA
How about using an array
MyModel[]whereMyModellooks like this:Generics should be avoiding when exposing SOAP web services.