Hamish Lindsell-Stewart
New member
- Joined
- Oct 6, 2011
- Messages
- 1
- Location
- Johannesburg, Gauteng, South Africa
- Programming Experience
- Beginner
Hi
This is post #1 for me - apologies if it's in the wrong forum.
I have deployed a web service that I would now like to test. I have created a class thus:
The class has been included in both the web service and my test Windows form app.
For some reason, when I try this in my test form:
I get "Value of type 'System.Collections.Generic.List(Of TestEdconWebService.WHITServe.OrderItem)' cannot be converted to '1-dimensional array of TestEdconWebService.WHITServe.OrderItem'."
So the list that's declared in the test form is seen as a list, but it's seeing the list in the web service as an array :uncomfortableness:
This is post #1 for me - apologies if it's in the wrong forum.
I have deployed a web service that I would now like to test. I have created a class thus:
VB.NET:
Public Class FulfilmentOrder
Public Unique_Ref As String
Public Invoice_Number As String
Public Order_Date As String
Public Delivery_Instructions1 As String
Public Delivery_Instructions2 As String
Public Number_of_Items As String
Public DeliveryDate As String
[B]Public orderItems As List(Of OrderItem) 'This is the problem item[/B]
Public timestamp As String
Public Customer As CustomerDetails
End Class
The class has been included in both the web service and my test Windows form app.
For some reason, when I try this in my test form:
VB.NET:
Dim Item As New WHITServe.OrderItem
Dim TempList As New List(Of WHITServe.OrderItem)
Item.Item_Code = "655"
Item.Item_Description = "Book"
Item.Qty = "10"
Item.Price = "100"
Item.Discount = "0"
Item.PreOrder = False
TempList.Add(Item)
[B] Order.orderItems = TempList[/B]
I get "Value of type 'System.Collections.Generic.List(Of TestEdconWebService.WHITServe.OrderItem)' cannot be converted to '1-dimensional array of TestEdconWebService.WHITServe.OrderItem'."
So the list that's declared in the test form is seen as a list, but it's seeing the list in the web service as an array :uncomfortableness: