我想創建和使用一個Web服務...我使用.NET Framework 4.0(C#)。 該服務公開這樣的方法:不能轉換類型'對象[] []'爲'System.Collections.Generic.List <object>'
public List<object[]> GetData(string strRegion, List<string> lstBrand, List<string> lstColor)
然後在客戶端應用程序,我宣佈對象的列表:
List<object[]> lst = new List<object[]>();
...並試圖填補它像這樣:
MyService.MyClient os = new MyClient();
lst = os.GetData(myRegionString, myBrandList, myColorList);
...但我得到「無法將類型'object [] []'轉換爲'System.Collections.Generic.List'」。我究竟做錯了什麼?
謝謝!
它看起來像服務方法實際上不會返回'List