tags:

views:

192

answers:

1

Hi,

Is it possible to pass an array as an argument from a C# code to a WCF web service?

I'm still new to all this.

Please help.

Thanks

+2  A: 

Yes absolutely. Your service contract could look like this:

[ServiceContract]
public interface IFooService
{
    void Foo(int[] intArray);
}

If you want to pass an array of some custom type this type needs to be marked with [DataContract] and its properties with [DataMember].

Darin Dimitrov