Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why we cant return List<T> in ASMX web services?

As developers know we cant return List<T> with web services, we can only return lists with converting them to .ToArray(); I've searched some, but cant get effective answer about Why we cant retun List with web services. Why we must convert them ToArray(); ?

like image 864
Serkan Hekimoglu Avatar asked Dec 03 '22 10:12

Serkan Hekimoglu


1 Answers

Web services are supposed to be interoperable with many languages. Nearly all languages have arrays, but only .NET has the specific implementation of List<T> that you're using.

like image 138
Joel Mueller Avatar answered Dec 05 '22 23:12

Joel Mueller