I have a WCF service method which I have written for return type as collection type.
But if I generate a proxy class and consume the method from the client the methods r
You need to tell svcutil
to generate the types as whatever generic type you want. You do this by adding this switch to the svcutil command:
svcutil ..blah... /ct:System.Collections.ObjectModel.Collection`1
The /ct
is short for /collectionType
. In this case I specified Collection
but you could have just as easily used System.Collections.Generic.List
.