I have a solution containing of 3 parts: wcf service, wpf app and silverlight 3 app.
Both wpf app and silverlight app use wcf service to get a collection of objects.
The point is that my business requirements insistently tell me to return ReadOnlyCollection<T> from wcf service.
When I try to do it I have Serialization exception in silverlight client app. But it's ok in wpf app.
Then, I haven't started the investigation for such strange thing (different behavior in wpf and silverlight) and decided to implement custom serialization, returning the ICollection interface and trying to get ReadOnlyCollection on deserializing. But wcf service proxy class in silverlight app returned Array of T, not ReadOnlyCollection<T> as proxy in wpf did.
So, the question is: Is it possible to return ReadOnlyCollection<T> from WCF service?
Any help is appreciate.
View Complete Post