View Single Post
  #1 (permalink)  
Old 01-07-2009, 7:55 AM
karimallen karimallen is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Jan 2009
Age: 24
Posts: 6
Reputation: 0
karimallen is on a distinguished programming path ahead
Default Webservice Passing Arrays Problem

I have a simple webservice with a function that returns a simple string array of ten items. When I call the function from my application it will not let me copy the returned array to another variable. I can count the array and access individual items however whenever I try to copy as shown below..

dim i as string()
i = webservice.getstringarray()

the program complains saying

'arrayofstring cannot be converted to 1-dimensional array of string'

the code is below im totally lost!!!!!!

<WebMethod()> _
Public Function Get_Practices() As String()
Dim PCB_Practices(1) As String
PCB_Practices(0) = "one"
PCB_Practices(1) = "two"
Return PCB_Practices
End Function

Public Sub Get_Practices()
Dim i As String()
i = dummy_web_service_pointer.Get_Practices() <<Error line!
End Sub
Reply With Quote