Why does WCF return myObject[] instead of List like I was expecting?

You can specify that you want to use a generic list instead of an array by clicking the advanced button when you add a reference, or you can right click on the service reference and choose configure to change it in place.

The reason is that WCF serializes Generic lists as arrays to send across the wire. The configuration is just telling svcutil to create a proxy that converts them back to a generic list for your convenience.

Leave a Comment