Why we cant return List in ASMX web services?

前端 未结 5 2016
忘掉有多难
忘掉有多难 2021-01-06 10:09

As developers know we cant return List with web services, we can only return lists with converting them to .ToArray(); I\'ve searched some, but cant ge

5条回答
  •  孤街浪徒
    2021-01-06 10:41

    What's described in the web services is a "collection". It's up to the client to determine what type of "collection" to use. If the client's .Net, when adding the service reference, click Advanced, and you'll have the ability to choose a generic list.

提交回复
热议问题