Does WCF support generic collections? I looked at the proxy object, and it seems to generate object array from a generic list collection.
Thanks
NET 2.0 has introduced a new namespace called System. Collections. Generic which contains classes that support generics.
NET class library defines several generic interfaces for use with the collection classes in the System. Collections. Generic namespace.
Generic namespace. This namespace contains interfaces and classes that define generic collections and operations. All the generic collections implement a series of generic interfaces, which are also defined in this namespace.
WCF does support generic collections. Over the wire it is transfered as an array of objects (this is the standard way of sending lists/arrays/etc), but WCF does the serialization/deserialization for you, so as far as your client/server are concerned, the collections are generic.
Edit: a caveat is, of course, that the collection has to be serializable. Also, take a look at this if you asking your question because your custom collection is being treated as an T[] on the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With