【发布时间】:2012-05-22 02:34:49
【问题描述】:
将列表发送到网络服务后出现错误。
这是调用网络服务的代码:
Dim sProgramInterest As New List(Of Integer)
crmService.InsertProspectGetId(sProgramInterest.ToList)
但是我收到了这个错误。
无法将“System.Collections.Generic.List`1[System.Int32]”类型的对象转换为“crmWebService.ArrayOfInt”类型。
web服务接受的参数是:
ByVal sProgramInterest As List(Of Integer)
【问题讨论】:
-
看起来 crmWebService.ArrayOfInt 是自定义类型。你能发布它的定义吗?右键单击 InsertProspectGetId 并转到定义。它的参数是 ArrayOfInt 类型的 去它的定义,你能发布它吗?
标签: .net vb.net exception-handling casting