I'm trying to consume a WCF service that returns a custom list in the form List<StockData>
.
Here's the method signature from IService.cs
:
[OperationContract]
List<StockData> orderStockData(string compName1, string compName2, string compName3);
But when I try referencing it in my website through a service reference:
List<StockData> list = new List<StockData>();
list = myProxy.orderStockData(txtinput1.Text, txtinput2.Text, txtinput3.Text);
I get the following error:
Cannot implicitly convert type 'ServiceReference1.StockData[] ' to Systems.Collections.Generic.List
Any help with solving this would be great. Thanks!