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
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
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]
.