在wcf服务端定义了一个返回List<string>的方法,然后客户端引用服务,方法返回值确变成了string[],返回值为什么会改变呢?
经Google查询后,The reason is that WCF serializes Generic lists as arrays to send across the wire。
为了使客户端的返回值变为List<string>,可以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.