Vadim
Vadim

Reputation: 9

why WCF service don't return list<>?

When i add/edit the service client, if i click on the "Advanced ..." button i will see an option allowing me to choose the collection type for my client proxy . The default is System.Array. When I change to System.Collaction.Generic.List and click Add proxy create. But in my method return value i see type[] but not List, why? What i do wrong? this is class:

[DataContract]
public class Asset
{
    [DataMember]
    public decimal AssetId { get; set; }
    [DataMember]
    public string AssetName { get; set; }
 }

Upvotes: 0

Views: 230

Answers (1)

burning_LEGION
burning_LEGION

Reputation: 13460

when you generate proxy class choise List instead Array

Upvotes: 1

Related Questions