Thursday, July 7, 2011

Error Cannot convert from 'System.Collections.Generic.List' to 'System.Collection.ObjectModel.ObservableCollection' : The Official Microsoft Silverlight Site

Microsoft SilverLightImage by denetsnuff via FlickrIn recent monts I keep coming up with this error message when I try to pass arrays through a web service from a silverlight app. I found this work around on the internet

Re: Re: Error Cannot convert from 'System.Collections.Generic.List<int>' to 'System.Collection.ObjectModel.ObservableCollection<int>'
RightClicking on your ServiceReference in Solution Explorer
Choose Configure Service Reference
on the Collection Type -> change to Generic List


One of the choices on Collection Type is "array" Once I make that change it all compiles well!!

Error Cannot convert from 'System.Collections.Generic.List<int>' to 'System.Collection.ObjectModel.ObservableCollection<int>' : The Official Microsoft Silverlight Site
Enhanced by Zemanta

No comments:

Post a Comment