When using the svcutil.exe in order to create WCF proxy, any reflected collection will be converted into System.Array by default.
Good to know that this can be controlled using the svcutil.exe.
You can define the output data type for collections using the "/ct:" keyword.
For example, generating generic list collection (System.Collections.Generic.List<T>) will be done like that:
svcutil.exe http://localhost/Services/Sample.svc?wsdl /ct:System.Collections.Generic.List`1
This brings us all of the generics advantages and it is much more comfortable for working then the old System.Array.
You can choose other collection types like ArrayList, Collection etc.
Dictionary output data type can be controlled either.
When using Visual Studio 2008, there is ready to use menu where you can define that.
Right click your relevant service reference –> Configure service reference option and you can choose the output data type for collections and dictionaries types.
Hope this helps,
Tamir Shlomi
Visual Studio .NET Tips & Tricks is a very useful e-book you can download for free.
Justifying its reputation, it contains a lot of useful tips and tricks about advanced using the IDE which makes coding much more comfortable and effective.
I think that even experienced Visual Studio user will find it useful.
Please note: even though it’s refers to the Visual Studio versions before the VS2008 it is still helpful as the most is the same across all the versions.
As I mentioned before, it's for free so here is the download link.
Enjoy, :-)
Tamir Shlomi