我已經有WCF服務,其中包含來自LibW.dll(我的DLL)的數據列表。在主程序中,我也從LibW.dll獲得了列表。不能隱式轉換類型System.Collections.ObjectModel.ObservableCollection <>到System.Collections.Generic.List <>
我返回列表從WCF服務
[OperationContract]
public List<IWeather> Final()
{
return returner;
}
,然後嘗試設置方法的結果重視
cont = e.Result;
其中
List<LibW.IWeather> cont=new List<LibW.IWeather>();
但我有這樣的錯誤 不能隱式轉換類型System.Collections.ObjectModel.ObservableCollection<object>' to 'System.Collections.Generic.List<NavigationGadget.IWeather>
怎麼了?
請參閱[我是否*在Silverlight WCF客戶端中使用ObservableCollection?](http://stackoverflow.com/q/1911441/119477) – 2012-03-22 21:48:44