I'm having difficulties with this...
I need to return a two-dimensional string array from a web service....
It seems simple enough...
VB Code:
<WebMethod> Public Function ReturnMultiDimArray() As String()() Dim y As String() Dim z As String() Dim x As String()() = New String()() {y, z} Return x End Function
However, I need to populate the two dimensions (y and z) dynamically from a datareader.
So I tried using () arrayLists for y and z, and using to arraylist.ToArray method, but of course, I get an invalid cast exception when trying to build the 2-d string array:
VB Code:
Dim x As String()() = New String()() {y.ToArray, z.ToArray}
I saw StringDictionary, but that doesn't serialize... and I don't want to waste hours figuring out to implement Iserializable and implenets getObject....
Any ideas?




) arrayLists for y and z, and using to arraylist.ToArray method, but of course, I get an invalid cast exception when trying to build the 2-d string
Reply With Quote