jamie_pattison
Well-known member
- Joined
- Sep 9, 2008
- Messages
- 116
- Programming Experience
- Beginner
Im using a service to get a list of houses based on the input from a customer. When i pass in GetListHouse i get the error "Value of type 'HouseList' cannot be converted to '1-dimensional array of HouseList'.".
So i understand that i need to insert the item that im referring to i.e. Houselist(0) but the way ive coded it im wondering what would be the "correct" to do this?
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Username = "user"
Password = "password"
Using svcHouseFinance As New HouseClient
svcHouseFinance.Open()
svcHouseFinance.Calculate(GetListHouse, Username, Password)
svcHouseFinance.Close
End Using
End Sub
Private Function GetListHouse() As HouseList
Dim hl As New HouseList
With hl
.Id = 1234
.Purchaser = DisplayPurchaserList
......
End With
Return hl
End Function
Thanks
So i understand that i need to insert the item that im referring to i.e. Houselist(0) but the way ive coded it im wondering what would be the "correct" to do this?
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Username = "user"
Password = "password"
Using svcHouseFinance As New HouseClient
svcHouseFinance.Open()
svcHouseFinance.Calculate(GetListHouse, Username, Password)
svcHouseFinance.Close
End Using
End Sub
Private Function GetListHouse() As HouseList
Dim hl As New HouseList
With hl
.Id = 1234
.Purchaser = DisplayPurchaserList
......
End With
Return hl
End Function
Thanks
Last edited: