Due to the existing structure that I use, a method call returns a SortedList object. Since I wrote the other side of this call, I know that this is actually a SortedList. Although I can continue to work with SortedList, using generic could improve my meaning. So how do you change a non-generic SortedList to a properly typed generic SortedList?
The background in this case is that the call is a remote procedure call using SoapFormatter. SoapFormatter does not implement generics (thanks, Microsoft). I cannot change the formatter since some non-networks also use other method calls for the service.
I want my proxy request to look like this:
public SortedList<string, long> GetList(string parameter)
{
return _service.GetList(parameter);
}
GetList - SoapFormatter:
public SortedList GetList(string parameter);